org.jacorb.notification.util

Class AbstractPoolable

public abstract class AbstractPoolable extends Object implements Disposable

Interface to indicate that a Object can be pooled. Objects can be pooled to spare ressources.

Version: $Id: AbstractPoolable.java,v 1.3 2005/08/21 13:38:40 alphonse.bendt Exp $

Author: Alphonse Bendt

Field Summary
protected Loggerlogger_
Method Summary
voiddispose()
The call to this Method indicates that this Object is not needed by the user anymore.
abstract voidreset()
Reset the Object to an initial state.
voidsetObjectPool(AbstractObjectPool pool)
Set the ObjectPool to which this instance should be returned.

Field Detail

logger_

protected final Logger logger_

Method Detail

dispose

public void dispose()
The call to this Method indicates that this Object is not needed by the user anymore. After a call to dispose the Object can be returned to its ObjectPool. It's forbidden to use the Object after release has been called as this may cause unexpected behaviour.

reset

public abstract void reset()
Reset the Object to an initial state. Subclasses should override this method appropiately to reset the instance to an initial state.

setObjectPool

public void setObjectPool(AbstractObjectPool pool)
Set the ObjectPool to which this instance should be returned.