com.ibm.portal.pool
Interface Instantiator<E>


public interface Instantiator<E>

Interface which allows for creating new objects as well as disposing them when they are not used any longer.

Since:
6.1.0.1

Method Summary
 void disposeObject(E obj)
          Called optionally by the system that uses the instantiator to create new object instances of the life cycle of this object (as managed by the system) has ended.
 E newObject()
          Creates a new instance of an object based on some predefined settings.
 

Method Detail

disposeObject

void disposeObject(E obj)
Called optionally by the system that uses the instantiator to create new object instances of the life cycle of this object (as managed by the system) has ended. The instantiator may cleanup resources associated with the object in this case.

Parameters:
obj - object that has been created via the newObject method previously

newObject

E newObject()
            throws java.lang.IllegalAccessException,
                   java.lang.InstantiationException,
                   java.lang.ExceptionInInitializerError,
                   java.lang.SecurityException
Creates a new instance of an object based on some predefined settings.

Returns:
new object
Throws:
java.lang.IllegalAccessException - if the class or its nullary constructor is not accessible.
java.lang.InstantiationException - if this Class represents an abstract class, an interface, an array class, a primitive type, or void; or if the class has no nullary constructor; or if the instantiation fails for some other reason.
java.lang.ExceptionInInitializerError - if the initialization provoked by this method fails.
java.lang.SecurityException - if there is no permission to create a new instance.