org.wso2.carbon.databridge.agent.endpoint.binary
Class BinarySecureClientPoolFactory

java.lang.Object
  extended by org.apache.commons.pool.BaseKeyedPoolableObjectFactory
      extended by org.wso2.carbon.databridge.agent.client.AbstractClientPoolFactory
          extended by org.wso2.carbon.databridge.agent.client.AbstractSecureClientPoolFactory
              extended by org.wso2.carbon.databridge.agent.endpoint.binary.BinarySecureClientPoolFactory
All Implemented Interfaces:
org.apache.commons.pool.KeyedPoolableObjectFactory

public class BinarySecureClientPoolFactory
extends AbstractSecureClientPoolFactory

This is a Binary Transport secure implementation for AbstractSecureClientPoolFactory to be used by BinaryEndpoint.


Constructor Summary
BinarySecureClientPoolFactory(String trustStore, String trustStorePassword)
           
 
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.wso2.carbon.databridge.agent.client.AbstractSecureClientPoolFactory
getTrustStore, getTrustStorePassword
 
Methods inherited from class org.wso2.carbon.databridge.agent.client.AbstractClientPoolFactory
destroyObject, makeObject, validateObject
 
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

BinarySecureClientPoolFactory

public BinarySecureClientPoolFactory(String trustStore,
                                     String trustStorePassword)
Method Detail

createClient

public Object createClient(String protocol,
                           String hostName,
                           int port)
                    throws DataEndpointException,
                           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 endpoint
hostName - hostname of the endpoint
port - 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:
DataEndpointException
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.