org.wso2.carbon.databridge.agent.internal.client
Class AbstractClientPoolFactory

java.lang.Object
  extended by org.apache.commons.pool.BaseKeyedPoolableObjectFactory
      extended by org.wso2.carbon.databridge.agent.internal.client.AbstractClientPoolFactory
All Implemented Interfaces:
org.apache.commons.pool.KeyedPoolableObjectFactory
Direct Known Subclasses:
AbstractSecureClientPoolFactory, BinaryClientPoolFactory, ThriftClientPoolFactory

public abstract class AbstractClientPoolFactory
extends org.apache.commons.pool.BaseKeyedPoolableObjectFactory


Constructor Summary
AbstractClientPoolFactory()
           
 
Method Summary
abstract  Object createClient(String protocol, String hostName, int port)
           
 void destroyObject(Object key, Object obj)
           
 Object makeObject(Object key)
           
abstract  void terminateClient(Object client)
           
abstract  boolean validateClient(Object client)
           
 boolean validateObject(Object key, Object obj)
           
 
Methods inherited from class org.apache.commons.pool.BaseKeyedPoolableObjectFactory
activateObject, passivateObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractClientPoolFactory

public AbstractClientPoolFactory()
Method Detail

makeObject

public Object makeObject(Object key)
                  throws DataEndpointException,
                         DataEndpointAgentSecurityException
Specified by:
makeObject in interface org.apache.commons.pool.KeyedPoolableObjectFactory
Specified by:
makeObject in class org.apache.commons.pool.BaseKeyedPoolableObjectFactory
Throws:
DataEndpointException
DataEndpointAgentSecurityException

createClient

public abstract Object createClient(String protocol,
                                    String hostName,
                                    int port)
                             throws DataEndpointException,
                                    DataEndpointAgentSecurityException
Throws:
DataEndpointException
DataEndpointAgentSecurityException

validateObject

public boolean validateObject(Object key,
                              Object obj)
Specified by:
validateObject in interface org.apache.commons.pool.KeyedPoolableObjectFactory
Overrides:
validateObject in class org.apache.commons.pool.BaseKeyedPoolableObjectFactory

validateClient

public abstract boolean validateClient(Object client)

destroyObject

public void destroyObject(Object key,
                          Object obj)
Specified by:
destroyObject in interface org.apache.commons.pool.KeyedPoolableObjectFactory
Overrides:
destroyObject in class org.apache.commons.pool.BaseKeyedPoolableObjectFactory

terminateClient

public abstract void terminateClient(Object client)


Copyright © 2015 WSO2. All rights reserved.