|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The interface PoolMatchFactory defines the object used by a Pool to test if a given resource of a Pool matches with the hints passed with the Pool getResource method. It also allows such a Pool to allocate a PoolResource as needed, conforming to the passed hints. Finally the factory is called when a resource is going to be destroyed.
Method Summary | |
---|---|
java.lang.Object |
createResource(java.lang.Object hints)
createResource creates a new PoolResource. |
void |
destroyResource(java.lang.Object resource)
is called when a resource is going to be destroyed. |
boolean |
matchResource(java.lang.Object resource,
java.lang.Object hints)
matchResource tests if a given resource of a Pool matches with the hints passed with the Pool getResource method. |
Method Detail |
public java.lang.Object createResource(java.lang.Object hints) throws PoolException
hints
- The "properties" that the created PoolResource should
conform to.
PoolException
public boolean matchResource(java.lang.Object resource, java.lang.Object hints)
resource
- The PoolResource to test its matching with some
"properties" specified by hints.hints
- The "properties" that the PoolResource specified by pr
should match.
public void destroyResource(java.lang.Object resource)
resource
- to initialize.
|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |