public class

MongoCloudConnectorConnectionManager

extends ExpressionEvaluatorSupport
implements MetadataAware MuleContextAware ProcessAdapter<O> Capabilities Disposable Initialisable Testable ConnectionManager<K, C extends Connection>
java.lang.Object
   ↳ org.mule.devkit.processor.ExpressionEvaluatorSupport
     ↳ org.mule.module.mongo.connectivity.MongoCloudConnectorConnectionManager

Class Overview

A MongoCloudConnectorConnectionManager is a wrapper around MongoCloudConnector that adds connection management capabilities to the pojo.

Summary

Constants
String DEVKIT_BUILD
String DEVKIT_VERSION
String MIN_MULE_VERSION
String MODULE_NAME
String MODULE_VERSION
[Expand]
Inherited Constants
From interface org.mule.api.lifecycle.Disposable
From interface org.mule.api.lifecycle.Initialisable
Fields
private Boolean autoConnectRetry
private Integer connectTimeout
private KeyedObjectPool connectionPool Connector Pool
private Integer connectionsPerHost
private String database
protected FlowConstruct flowConstruct Flow Construct
private String host
private Integer maxWaitTime
protected MuleContext muleContext Mule Context
private String password
protected PoolingProfile poolingProfile
private int port
protected RetryPolicyTemplate retryPolicyTemplate
private Integer socketTimeout
private Integer threadsAllowedToBlockForConnectionMultiplier
private String username
Public Constructors
MongoCloudConnectorConnectionManager()
Public Methods
MongoCloudConnectorConnectionIdentifierAdapter acquireConnection(MongoCloudConnectorConnectionKey key)
DefaultResult buildFailureTestResult(Exception exception)
void destroyConnection(MongoCloudConnectorConnectionKey key, MongoCloudConnectorConnectionIdentifierAdapter connection)
void dispose()
Boolean getAutoConnectRetry()
Retrieves autoConnectRetry
Integer getConnectTimeout()
Retrieves connectTimeout
Integer getConnectionsPerHost()
Retrieves connectionsPerHost
String getDatabase()
Retrieves database
MongoCloudConnectorConnectionKey getDefaultConnectionKey()
Retrieve the default connection key
String getDevkitBuild()
String getDevkitVersion()
MongoCloudConnectorConnectionKey getEvaluatedConnectionKey(MuleEvent event)
Retrieve the connection key evaluated with the received mule event
FlowConstruct getFlowConstruct()
Retrieves flowConstruct
String getHost()
Retrieves host
Integer getMaxWaitTime()
Retrieves maxWaitTime
String getMinMuleVersion()
String getModuleName()
String getModuleVersion()
MuleContext getMuleContext()
Retrieves muleContext
String getPassword()
Retrieves password
PoolingProfile getPoolingProfile()
Retrieves poolingProfile
int getPort()
Retrieves port
<P> ProcessTemplate<P, MongoCloudConnectorConnectionIdentifierAdapter> getProcessTemplate()
RetryPolicyTemplate getRetryPolicyTemplate()
Retrieves retryPolicyTemplate
Integer getSocketTimeout()
Retrieves socketTimeout
Integer getThreadsAllowedToBlockForConnectionMultiplier()
Retrieves threadsAllowedToBlockForConnectionMultiplier
String getUsername()
Retrieves username
void initialise()
boolean isCapableOf(ModuleCapability capability)
Returns true if this module implements such capability
void releaseConnection(MongoCloudConnectorConnectionKey key, MongoCloudConnectorConnectionIdentifierAdapter connection)
void setAutoConnectRetry(Boolean value)
Sets autoConnectRetry
void setConnectTimeout(Integer value)
Sets connectTimeout
void setConnectionsPerHost(Integer value)
Sets connectionsPerHost
void setDatabase(String value)
Sets database
void setFlowConstruct(FlowConstruct value)
Sets flowConstruct
void setHost(String value)
Sets host
void setMaxWaitTime(Integer value)
Sets maxWaitTime
void setMuleContext(MuleContext value)
Sets muleContext
void setPassword(String value)
Sets password
void setPoolingProfile(PoolingProfile value)
Sets poolingProfile
void setPort(int value)
Sets port
void setRetryPolicyTemplate(RetryPolicyTemplate value)
Sets retryPolicyTemplate
void setSocketTimeout(Integer value)
Sets socketTimeout
void setThreadsAllowedToBlockForConnectionMultiplier(Integer value)
Sets threadsAllowedToBlockForConnectionMultiplier
void setUsername(String value)
Sets username
TestResult test()
[Expand]
Inherited Methods
From class org.mule.devkit.processor.ExpressionEvaluatorSupport
From class java.lang.Object
From interface org.mule.api.MetadataAware
From interface org.mule.api.context.MuleContextAware
From interface org.mule.api.devkit.ProcessAdapter
From interface org.mule.api.devkit.capability.Capabilities
From interface org.mule.api.lifecycle.Disposable
From interface org.mule.api.lifecycle.Initialisable
From interface org.mule.common.Testable
From interface org.mule.module.mongo.connection.ConnectionManager

Constants

private static final String DEVKIT_BUILD

Constant Value: "UNNAMED.2039.0541b23"

private static final String DEVKIT_VERSION

Constant Value: "3.5.2"

private static final String MIN_MULE_VERSION

Constant Value: "3.5"

private static final String MODULE_NAME

Constant Value: "Mongo DB"

private static final String MODULE_VERSION

Constant Value: "3.6.1"

Fields

private Boolean autoConnectRetry

private Integer connectTimeout

private KeyedObjectPool connectionPool

Connector Pool

private Integer connectionsPerHost

private String database

protected FlowConstruct flowConstruct

Flow Construct

private String host

private Integer maxWaitTime

protected MuleContext muleContext

Mule Context

private String password

protected PoolingProfile poolingProfile

private int port

protected RetryPolicyTemplate retryPolicyTemplate

private Integer socketTimeout

private Integer threadsAllowedToBlockForConnectionMultiplier

private String username

Public Constructors

public MongoCloudConnectorConnectionManager ()

Public Methods

public MongoCloudConnectorConnectionIdentifierAdapter acquireConnection (MongoCloudConnectorConnectionKey key)

Parameters
key
Throws
Exception

public DefaultResult buildFailureTestResult (Exception exception)

Parameters
exception

public void destroyConnection (MongoCloudConnectorConnectionKey key, MongoCloudConnectorConnectionIdentifierAdapter connection)

Parameters
key
connection
Throws
Exception

public void dispose ()

public Boolean getAutoConnectRetry ()

Retrieves autoConnectRetry

public Integer getConnectTimeout ()

Retrieves connectTimeout

public Integer getConnectionsPerHost ()

Retrieves connectionsPerHost

public String getDatabase ()

Retrieves database

public MongoCloudConnectorConnectionKey getDefaultConnectionKey ()

Retrieve the default connection key

Returns
  • The default connection key

public String getDevkitBuild ()

public String getDevkitVersion ()

public MongoCloudConnectorConnectionKey getEvaluatedConnectionKey (MuleEvent event)

Retrieve the connection key evaluated with the received mule event

Parameters
event
Returns
  • The default connection key
Throws
Exception

public FlowConstruct getFlowConstruct ()

Retrieves flowConstruct

public String getHost ()

Retrieves host

public Integer getMaxWaitTime ()

Retrieves maxWaitTime

public String getMinMuleVersion ()

public String getModuleName ()

public String getModuleVersion ()

public MuleContext getMuleContext ()

Retrieves muleContext

public String getPassword ()

Retrieves password

public PoolingProfile getPoolingProfile ()

Retrieves poolingProfile

public int getPort ()

Retrieves port

public ProcessTemplate<P, MongoCloudConnectorConnectionIdentifierAdapter> getProcessTemplate ()

public RetryPolicyTemplate getRetryPolicyTemplate ()

Retrieves retryPolicyTemplate

Returns
  • The reconnection strategy

public Integer getSocketTimeout ()

Retrieves socketTimeout

public Integer getThreadsAllowedToBlockForConnectionMultiplier ()

Retrieves threadsAllowedToBlockForConnectionMultiplier

public String getUsername ()

Retrieves username

public void initialise ()

public boolean isCapableOf (ModuleCapability capability)

Returns true if this module implements such capability

Parameters
capability

public void releaseConnection (MongoCloudConnectorConnectionKey key, MongoCloudConnectorConnectionIdentifierAdapter connection)

Parameters
key
connection
Throws
Exception

public void setAutoConnectRetry (Boolean value)

Sets autoConnectRetry

Parameters
value Value to set

public void setConnectTimeout (Integer value)

Sets connectTimeout

Parameters
value Value to set

public void setConnectionsPerHost (Integer value)

Sets connectionsPerHost

Parameters
value Value to set

public void setDatabase (String value)

Sets database

Parameters
value Value to set

public void setFlowConstruct (FlowConstruct value)

Sets flowConstruct

Parameters
value Value to set

public void setHost (String value)

Sets host

Parameters
value Value to set

public void setMaxWaitTime (Integer value)

Sets maxWaitTime

Parameters
value Value to set

public void setMuleContext (MuleContext value)

Sets muleContext

Parameters
value Value to set

public void setPassword (String value)

Sets password

Parameters
value Value to set

public void setPoolingProfile (PoolingProfile value)

Sets poolingProfile

Parameters
value Value to set

public void setPort (int value)

Sets port

Parameters
value Value to set

public void setRetryPolicyTemplate (RetryPolicyTemplate value)

Sets retryPolicyTemplate

Parameters
value Value to set

public void setSocketTimeout (Integer value)

Sets socketTimeout

Parameters
value Value to set

public void setThreadsAllowedToBlockForConnectionMultiplier (Integer value)

Sets threadsAllowedToBlockForConnectionMultiplier

Parameters
value Value to set

public void setUsername (String value)

Sets username

Parameters
value Value to set

public TestResult test ()