public interface

ConnectionManager

org.mule.api.ConnectionManager<K, C>

Class Overview

Wrapper around Connector annotated class that will infuse it with connection management capabilities.

It can receive a 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 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 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