public interface

ConnectionManager

org.mule.modules.janrain.connection.ConnectionManager<K, C extends org.mule.modules.janrain.connection.Connection>
Known Indirect Subclasses

Class Overview

Wrapper around org.mule.api.annotations.Connector annotated class that will infuse it with connection management capabilities.

It can receive a org.mule.config.PoolingProfile which is a configuration object used to define the connection pooling parameters.

Summary

Public Methods
abstract C acquireConnection(K connectorKey)
Borrow a connection from the pool
abstract void destroyConnection(K connectorKey, C connector)
Destroy a connection
abstract PoolingProfile getConnectionPoolingProfile()
Retrieve the connection pooling profile
abstract K getDefaultConnectionKey()
Retrieve the default connection key
abstract RetryPolicyTemplate getRetryPolicyTemplate()
Retrieve the reconnection strategy used by this connection manager.
abstract void releaseConnection(K connectorKey, C connector)
Return a connection to the pool
abstract void setConnectionPoolingProfile(PoolingProfile value)
Set the connection pooling profile

Public Methods

public abstract C acquireConnection (K connectorKey)

Borrow a connection from the pool

Parameters
connectorKey Key used to borrow the connector
Returns
  • An existing connector, or a newly created one
Throws
Exception If the connection cannot be created

public abstract void destroyConnection (K connectorKey, C connector)

Destroy a connection

Parameters
connectorKey Key used to borrow the connector
connector Connector to be destroyed
Throws
Exception If the connection could not be destroyed.

public abstract PoolingProfile getConnectionPoolingProfile ()

Retrieve the connection pooling profile

Returns
  • PoolingProfile representing the pooling parameters

public abstract K getDefaultConnectionKey ()

Retrieve the default connection key

Returns
  • The default connection key

public abstract RetryPolicyTemplate getRetryPolicyTemplate ()

Retrieve the reconnection strategy used by this connection manager.

Returns
  • The reconnection strategy

public abstract void releaseConnection (K connectorKey, C connector)

Return a connection to the pool

Parameters
connectorKey Key used to borrow the connector
connector Connector to be returned to the pool
Throws
Exception If the connection cannot be returned

public abstract void setConnectionPoolingProfile (PoolingProfile value)

Set the connection pooling profile

Parameters
value PoolingProfile representing the pooling parameters