org.gvsig.tools.dispose.impl
Class AbstractDisposable

java.lang.Object
  extended by org.gvsig.tools.dispose.impl.AbstractDisposable
All Implemented Interfaces:
Disposable
Direct Known Subclasses:
DefaultDynObjectPagingHelper

public abstract class AbstractDisposable
extends Object
implements Disposable

Base implementation for Disposable classes.

When an instance of this class is created, it is registered as in use, and it is removed in the dispose method.

Author:
2009- César Ordiñana - gvSIG team

Constructor Summary
AbstractDisposable()
           
 
Method Summary
 void dispose()
          Disposes the current object, to allow it to close and dispose any used resources.
protected  void dispose(Disposable disposable)
          Utility method to dispose a Disposable, checking if it is null.
protected abstract  void doDispose()
          Internal implementation for the dispose() method, to be implemented by child classes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractDisposable

public AbstractDisposable()
Method Detail

dispose

public final void dispose()
Description copied from interface: Disposable
Disposes the current object, to allow it to close and dispose any used resources.

NOTE:After calling this method, the object may not be usable anymore.

Specified by:
dispose in interface Disposable

dispose

protected void dispose(Disposable disposable)
Utility method to dispose a Disposable, checking if it is null.

Parameters:
disposable - to dispose

doDispose

protected abstract void doDispose()
                           throws BaseException
Internal implementation for the dispose() method, to be implemented by child classes.

Throws:
BaseException
See Also:
dispose()


Copyright © 2004-2011 gvSIG. All Rights Reserved.