public class

TwitterConnectorConnectionManager

extends Object
implements MuleContextAware Initialisable Testable Capabilities MetadataAware ConnectionManager<K, C extends Connection> ProcessAdapter<O>
java.lang.Object
   ↳ org.mule.twitter.connectivity.TwitterConnectorConnectionManager

Class Overview

A TwitterConnectorConnectionManager is a wrapper around TwitterConnector that adds connection management capabilities to the pojo.

Summary

Constants
String DEVKIT_BUILD
String DEVKIT_VERSION
String MODULE_NAME
String MODULE_VERSION
[Expand]
Inherited Constants
From interface org.mule.api.lifecycle.Initialisable
Fields
private String accessKey
private String accessSecret
private GenericKeyedObjectPool connectionPool Connector Pool
protected PoolingProfile connectionPoolingProfile
private String consumerKey
private String consumerSecret
protected FlowConstruct flowConstruct Flow Construct
protected MuleContext muleContext Mule Context
private String proxyHost
private String proxyPassword
private int proxyPort
private String proxyUsername
protected RetryPolicyTemplate retryPolicyTemplate
private boolean useSSL
Public Constructors
TwitterConnectorConnectionManager()
Public Methods
TwitterConnectorConnectionIdentifierAdapter acquireConnection(TwitterConnectorConnectionKey key)
DefaultResult buildFailureTestResult(Exception exception)
void destroyConnection(TwitterConnectorConnectionKey key, TwitterConnectorConnectionIdentifierAdapter connection)
String getAccessKey()
Retrieves accessKey
String getAccessSecret()
Retrieves accessSecret
PoolingProfile getConnectionPoolingProfile()
Retrieves connectionPoolingProfile
String getConsumerKey()
Retrieves consumerKey
String getConsumerSecret()
Retrieves consumerSecret
TwitterConnectorConnectionKey getDefaultConnectionKey()
Retrieve the default connection key
String getDevkitBuild()
Returns the build of the DevKit used to create this module
String getDevkitVersion()
Returns the version of the DevKit used to create this module
FlowConstruct getFlowConstruct()
Retrieves flowConstruct
String getModuleName()
Returns the user-friendly name of this module
String getModuleVersion()
Returns the version of this module
MuleContext getMuleContext()
Retrieves muleContext
<P> ProcessTemplate<P, TwitterConnectorConnectionIdentifierAdapter> getProcessTemplate()
String getProxyHost()
Retrieves proxyHost
String getProxyPassword()
Retrieves proxyPassword
int getProxyPort()
Retrieves proxyPort
String getProxyUsername()
Retrieves proxyUsername
RetryPolicyTemplate getRetryPolicyTemplate()
Retrieves retryPolicyTemplate
boolean getUseSSL()
Retrieves useSSL
void initialise()
boolean isCapableOf(Capability capability)
Returns true if this module implements such capability
void releaseConnection(TwitterConnectorConnectionKey key, TwitterConnectorConnectionIdentifierAdapter connection)
void setAccessKey(String value)
Sets accessKey
void setAccessSecret(String value)
Sets accessSecret
void setConnectionPoolingProfile(PoolingProfile value)
Sets connectionPoolingProfile
void setConsumerKey(String value)
Sets consumerKey
void setConsumerSecret(String value)
Sets consumerSecret
void setFlowConstruct(FlowConstruct value)
Sets flowConstruct
void setMuleContext(MuleContext value)
Sets muleContext
void setProxyHost(String value)
Sets proxyHost
void setProxyPassword(String value)
Sets proxyPassword
void setProxyPort(int value)
Sets proxyPort
void setProxyUsername(String value)
Sets proxyUsername
void setRetryPolicyTemplate(RetryPolicyTemplate value)
Sets retryPolicyTemplate
void setUseSSL(boolean value)
Sets useSSL
TestResult test()
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.mule.api.context.MuleContextAware
From interface org.mule.api.lifecycle.Initialisable
From interface org.mule.common.Testable
From interface org.mule.twitter.basic.Capabilities
From interface org.mule.twitter.basic.MetadataAware
From interface org.mule.twitter.connection.ConnectionManager
From interface org.mule.twitter.process.ProcessAdapter

Constants

private static final String DEVKIT_BUILD

Constant Value: "3.4.0.1555.8df15c1"

private static final String DEVKIT_VERSION

Constant Value: "3.4.0"

private static final String MODULE_NAME

Constant Value: "Twitter"

private static final String MODULE_VERSION

Constant Value: "2.9.2"

Fields

private String accessKey

private String accessSecret

private GenericKeyedObjectPool connectionPool

Connector Pool

protected PoolingProfile connectionPoolingProfile

private String consumerKey

private String consumerSecret

protected FlowConstruct flowConstruct

Flow Construct

protected MuleContext muleContext

Mule Context

private String proxyHost

private String proxyPassword

private int proxyPort

private String proxyUsername

protected RetryPolicyTemplate retryPolicyTemplate

private boolean useSSL

Public Constructors

public TwitterConnectorConnectionManager ()

Public Methods

public TwitterConnectorConnectionIdentifierAdapter acquireConnection (TwitterConnectorConnectionKey key)

Parameters
key
Throws
Exception

public DefaultResult buildFailureTestResult (Exception exception)

Parameters
exception

public void destroyConnection (TwitterConnectorConnectionKey key, TwitterConnectorConnectionIdentifierAdapter connection)

Parameters
key
connection
Throws
Exception

public String getAccessKey ()

Retrieves accessKey

public String getAccessSecret ()

Retrieves accessSecret

public PoolingProfile getConnectionPoolingProfile ()

Retrieves connectionPoolingProfile

Returns
  • PoolingProfile representing the pooling parameters

public String getConsumerKey ()

Retrieves consumerKey

public String getConsumerSecret ()

Retrieves consumerSecret

public TwitterConnectorConnectionKey getDefaultConnectionKey ()

Retrieve the default connection key

Returns
  • The default connection key

public String getDevkitBuild ()

Returns the build of the DevKit used to create this module

public String getDevkitVersion ()

Returns the version of the DevKit used to create this module

public FlowConstruct getFlowConstruct ()

Retrieves flowConstruct

public String getModuleName ()

Returns the user-friendly name of this module

public String getModuleVersion ()

Returns the version of this module

public MuleContext getMuleContext ()

Retrieves muleContext

public String getProxyHost ()

Retrieves proxyHost

public String getProxyPassword ()

Retrieves proxyPassword

public int getProxyPort ()

Retrieves proxyPort

public String getProxyUsername ()

Retrieves proxyUsername

public RetryPolicyTemplate getRetryPolicyTemplate ()

Retrieves retryPolicyTemplate

Returns
  • The reconnection strategy

public boolean getUseSSL ()

Retrieves useSSL

public void initialise ()

public boolean isCapableOf (Capability capability)

Returns true if this module implements such capability

Parameters
capability The capability to test for
Returns
  • True if it does, false otherwise

public void releaseConnection (TwitterConnectorConnectionKey key, TwitterConnectorConnectionIdentifierAdapter connection)

Parameters
key
connection
Throws
Exception

public void setAccessKey (String value)

Sets accessKey

Parameters
value Value to set

public void setAccessSecret (String value)

Sets accessSecret

Parameters
value Value to set

public void setConnectionPoolingProfile (PoolingProfile value)

Sets connectionPoolingProfile

Parameters
value Value to set

public void setConsumerKey (String value)

Sets consumerKey

Parameters
value Value to set

public void setConsumerSecret (String value)

Sets consumerSecret

Parameters
value Value to set

public void setFlowConstruct (FlowConstruct value)

Sets flowConstruct

Parameters
value Value to set

public void setMuleContext (MuleContext value)

Sets muleContext

Parameters
value Value to set

public void setProxyHost (String value)

Sets proxyHost

Parameters
value Value to set

public void setProxyPassword (String value)

Sets proxyPassword

Parameters
value Value to set

public void setProxyPort (int value)

Sets proxyPort

Parameters
value Value to set

public void setProxyUsername (String value)

Sets proxyUsername

Parameters
value Value to set

public void setRetryPolicyTemplate (RetryPolicyTemplate value)

Sets retryPolicyTemplate

Parameters
value Value to set

public void setUseSSL (boolean value)

Sets useSSL

Parameters
value Value to set

public TestResult test ()