public interface

ConnectionManager

org.mule.module.linkedin.connection.ConnectionManager<K, C extends org.mule.module.linkedin.connection.Connection>

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 K getDefaultConnectionKey()
Retrieve the default connection key
abstract K getEvaluatedConnectionKey(MuleEvent event)
Retrieve the connection key evaluated with the received mule event
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

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 K getDefaultConnectionKey ()

Retrieve the default connection key

Returns
  • The default connection key

public abstract K getEvaluatedConnectionKey (MuleEvent event)

Retrieve the connection key evaluated with the received mule event

Parameters
event
Returns
  • The default connection key
Throws
Exception

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