public abstract class AbstractClientPoolFactory
extends org.apache.commons.pool.BaseKeyedPoolableObjectFactory
| Constructor and Description |
|---|
AbstractClientPoolFactory() |
| Modifier and Type | Method and Description |
|---|---|
abstract Object |
createClient(String protocol,
String hostName,
int port)
Make a connection to the receiver and return the client.
|
void |
destroyObject(Object key,
Object obj) |
Object |
makeObject(Object key) |
abstract void |
terminateClient(Object client)
Terminates the connection between the client and the endpoint.
|
abstract boolean |
validateClient(Object client)
Check the validity of the client whether it's in the position to make the
communication with endpoint.
|
boolean |
validateObject(Object key,
Object obj) |
public Object makeObject(Object key) throws DataEndpointException, DataEndpointConfigurationException
makeObject in interface org.apache.commons.pool.KeyedPoolableObjectFactorymakeObject in class org.apache.commons.pool.BaseKeyedPoolableObjectFactoryDataEndpointExceptionDataEndpointConfigurationExceptionpublic abstract Object createClient(String protocol, String hostName, int port) throws DataEndpointException
protocol - protocol that is used to connect to the endpointhostName - hostname of the endpointport - port of the endpoint that is listening toDataEndpointException - Exception to be thrown when communicating with DataEndpoint.public boolean validateObject(Object key, Object obj)
validateObject in interface org.apache.commons.pool.KeyedPoolableObjectFactoryvalidateObject in class org.apache.commons.pool.BaseKeyedPoolableObjectFactorypublic abstract boolean validateClient(Object client)
client - Client object which needs to be validated.public void destroyObject(Object key, Object obj)
destroyObject in interface org.apache.commons.pool.KeyedPoolableObjectFactorydestroyObject in class org.apache.commons.pool.BaseKeyedPoolableObjectFactorypublic abstract void terminateClient(Object client)
client - The client which needs to be terminated.Copyright © 2021 WSO2. All rights reserved.