org.wso2.carbon.databridge.agent.endpoint.thrift
Class ThriftSecureClientPoolFactory
java.lang.Object
org.apache.commons.pool.BaseKeyedPoolableObjectFactory
org.wso2.carbon.databridge.agent.client.AbstractClientPoolFactory
org.wso2.carbon.databridge.agent.client.AbstractSecureClientPoolFactory
org.wso2.carbon.databridge.agent.endpoint.thrift.ThriftSecureClientPoolFactory
- All Implemented Interfaces:
- org.apache.commons.pool.KeyedPoolableObjectFactory
public class ThriftSecureClientPoolFactory
- extends AbstractSecureClientPoolFactory
This is a Thrift secure transport implementation for AbstractSecureClientPoolFactory
to be used by the Thrift Endpoint.
|
Method Summary |
Object |
createClient(String protocol,
String hostName,
int port)
Make a connection to the receiver and return the client. |
void |
terminateClient(Object client)
Terminates the connection between the client and the endpoint. |
boolean |
validateClient(Object client)
Check the validity of the client whether it's in the position to make the
communication with endpoint. |
| 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 |
ThriftSecureClientPoolFactory
public ThriftSecureClientPoolFactory(String trustStore,
String trustStorePassword)
createClient
public Object createClient(String protocol,
String hostName,
int port)
throws DataEndpointSecurityException
- Description copied from class:
AbstractClientPoolFactory
- Make a connection to the receiver and return the client.
- Specified by:
createClient in class AbstractClientPoolFactory
- Parameters:
protocol - protocol that is used to connect to the endpointhostName - hostname of the endpointport - port of the endpoint that is listening to
- Returns:
- A valid client which has connected to the receiver and can be used
for rest of the operations regarding the endpoint.
- Throws:
DataEndpointSecurityException
validateClient
public boolean validateClient(Object client)
- Description copied from class:
AbstractClientPoolFactory
- Check the validity of the client whether it's in the position to make the
communication with endpoint.
- Specified by:
validateClient in class AbstractClientPoolFactory
- Parameters:
client - Client object which needs to be validated.
- Returns:
- Returns true/false based on the client is valid or invalid.
terminateClient
public void terminateClient(Object client)
- Description copied from class:
AbstractClientPoolFactory
- Terminates the connection between the client and the endpoint.
- Specified by:
terminateClient in class AbstractClientPoolFactory
- Parameters:
client - The client which needs to be terminated.
Copyright © 2015 WSO2. All rights reserved.