|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ObjectFactory
This interface is to define how an ObjectFactory is defined. While this class is not strictly necessary, the implementation of the Pool can differ object creation to and instance of this interface.
Field Summary | |
---|---|
static String |
ROLE
|
Method Summary | |
---|---|
void |
dispose(Object object)
Performs any deconstruction that is necessary for the object. |
Class |
getCreatedClass()
Get the class of the object you are creating. |
Object |
newInstance()
Create a new instance of the object being pooled. |
Field Detail |
---|
static final String ROLE
Method Detail |
---|
Object newInstance() throws Exception
Exception
- if the object cannot be instantiatedClass getCreatedClass()
void dispose(Object object) throws Exception
object
- to destroy
IllegalArgumentException
- if the object is not of
the same class that the factory creates.
Exception
- if there is any other reason that the
factory has problems disposing of the object.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |