|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||

java.lang.Objecttoolbox.pooling.ResourcePoolImpl
toolbox.pooling.SocketResourcePool
public class SocketResourcePool
ResourcePool implementation to do client socket connection pooling.
| Field Summary |
|---|
| Fields inherited from class toolbox.pooling.ResourcePoolImpl |
|---|
m_customProps |
| Constructor Summary | |
|---|---|
SocketResourcePool()
Default constructor |
|
| Method Summary | |
|---|---|
protected java.lang.Object |
createResource(XMLProperties xmlProps,
int count)
Create a SocketConfig instance from the given XMLProperties and retrieve a Socket instance from the config instance. |
protected void |
destroyResource(java.lang.Object resource)
Destroy the given Socket. |
protected boolean |
isResourceValid(java.lang.Object resource)
Validates the given socket connection and returns the validation state. |
protected void |
preInit(XMLProperties xmlProps)
Initialises the components required by this pool to perform resource creation and validation. |
| Methods inherited from class toolbox.pooling.ResourcePoolImpl |
|---|
destroy, getName, getResource, getStatus, getStatusString, init, releaseResource |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SocketResourcePool()
| Method Detail |
|---|
protected void preInit(XMLProperties xmlProps)
throws ResourcePoolException
preInit in class ResourcePoolImplxmlProps - XML configuration properties.
ResourcePoolException - if the custom initialisation fails.
protected java.lang.Object createResource(XMLProperties xmlProps,
int count)
throws ResourcePoolException
createResource in class ResourcePoolImplxmlProps - XML configuration properties.count - int indicating how many times this method has been
called.
ResourcePoolException - if the socket connection cannot be created.
protected void destroyResource(java.lang.Object resource)
throws ResourcePoolException
destroyResource in class ResourcePoolImplresource - Socket resource to destroy.
ResourcePoolException - if the connection could not be closed.
protected boolean isResourceValid(java.lang.Object resource)
throws ResourcePoolException
isResourceValid in class ResourcePoolImplresource - Socket connection to validate.
ResourcePoolException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||