org.gvsig.tools.dispose.impl
Class DefaultDisposableManager

java.lang.Object
  extended by org.gvsig.tools.dispose.impl.DefaultDisposableManager
All Implemented Interfaces:
DisposableManager

public class DefaultDisposableManager
extends Object
implements DisposableManager

Default implementation for the DisposableManager.

Author:
2009- C�sar Ordi�ana - gvSIG team

Constructor Summary
DefaultDisposableManager()
          Creates a new DefaultDisposableManager.
 
Method Summary
 boolean bind(Disposable disposable)
          Registers a disposable as being in use.
 int getBoundDisposableCount()
          Returns the number of Disposable objects pending to be released.
 Set getBoundDisposables()
          Returns a Set of Disposable objects currently bound.
 boolean release(Disposable disposable)
          Marks a disposable as not being used anymore.
 void releaseAll()
          Releases all bound Disposables.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultDisposableManager

public DefaultDisposableManager()
Creates a new DefaultDisposableManager.

Method Detail

bind

public boolean bind(Disposable disposable)
Description copied from interface: DisposableManager
Registers a disposable as being in use.

Specified by:
bind in interface DisposableManager
Parameters:
disposable - to bind
Returns:
true if the disposable was not already bound

release

public boolean release(Disposable disposable)
Description copied from interface: DisposableManager
Marks a disposable as not being used anymore.

Specified by:
release in interface DisposableManager
Parameters:
disposable - to release
Returns:
true if the disposable has been finally released

releaseAll

public void releaseAll()
                throws BaseException
Description copied from interface: DisposableManager
Releases all bound Disposables.

Specified by:
releaseAll in interface DisposableManager
Throws:
BaseException - if there is an error disposing any of the bound disposables

getBoundDisposableCount

public int getBoundDisposableCount()
Description copied from interface: DisposableManager
Returns the number of Disposable objects pending to be released.

Specified by:
getBoundDisposableCount in interface DisposableManager
Returns:
the number of Disposable objects pending to be released

getBoundDisposables

public Set getBoundDisposables()
Description copied from interface: DisposableManager
Returns a Set of Disposable objects currently bound.

Specified by:
getBoundDisposables in interface DisposableManager
Returns:


Copyright © 2004-2011 gvSIG. All Rights Reserved.