Package com.adaptris.core.jmx
Class JmxConnection
java.lang.Object
com.adaptris.core.AdaptrisConnectionImp
com.adaptris.core.AllowsRetriesConnection
com.adaptris.core.jmx.JmxConnection
- All Implemented Interfaces:
AdaptrisComponent,AdaptrisConnection,ComponentLifecycle,ComponentLifecycleExtension,StateManagedComponent
@ComponentProfile(summary="Connect to a JMX MBeanServer instance",
tag="connections,jmx")
public class JmxConnection
extends AllowsRetriesConnection
-
Field Summary
Fields inherited from class com.adaptris.core.AdaptrisConnectionImp
log -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanprotected voidClose the underlying connection.protected voidInitialise the underlying connection.protected voidvoidWhether or not to generate additional TRACE level debug when attempting connections.voidvoidSet the JMX ServiceURL.voidSet the password.voidSet the username for accessing JMX.protected voidStart the underlying connection.protected voidStop the underlying connection.withRetries(Integer maxRetries, TimeInterval retryInterval) Methods inherited from class com.adaptris.core.AllowsRetriesConnection
connectionAttempts, connectionRetryInterval, createLoggingStatement, getConnectionAttempts, getConnectionRetryInterval, logWarning, setConnectionAttempts, setConnectionRetryIntervalMethods inherited from class com.adaptris.core.AdaptrisConnectionImp
addExceptionListener, addMessageConsumer, addMessageProducer, changeState, cloneForTesting, close, connectionErrorHandler, getConnectionErrorHandler, getUniqueId, getWorkersFirstOnShutdown, init, prepare, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, retrieveConnection, retrieveExceptionListeners, retrieveMessageConsumers, retrieveMessageProducers, setConnectionErrorHandler, setUniqueId, setWorkersFirstOnShutdown, start, stop, workersFirstOnShutdown
-
Constructor Details
-
JmxConnection
public JmxConnection()
-
-
Method Details
-
prepareConnection
- Specified by:
prepareConnectionin classAdaptrisConnectionImp- Throws:
CoreException
-
initConnection
Description copied from class:AdaptrisConnectionImpInitialise the underlying connection.- Specified by:
initConnectionin classAdaptrisConnectionImp- Throws:
CoreException- wrapping any exception.
-
startConnection
Description copied from class:AdaptrisConnectionImpStart the underlying connection.- Specified by:
startConnectionin classAdaptrisConnectionImp- Throws:
CoreException- wrapping any exception.
-
stopConnection
protected void stopConnection()Description copied from class:AdaptrisConnectionImpStop the underlying connection.- Specified by:
stopConnectionin classAdaptrisConnectionImp
-
closeConnection
protected void closeConnection()Description copied from class:AdaptrisConnectionImpClose the underlying connection.- Specified by:
closeConnectionin classAdaptrisConnectionImp
-
mbeanServerConnection
- Throws:
CoreException
-
getJmxServiceUrl
- Returns:
- the jmxServiceUrl
-
setJmxServiceUrl
Set the JMX ServiceURL.- Parameters:
s- the jmxServiceUrl to set; if not specified, then a local JMX connector is assumed.
-
getJmxProperties
- Returns:
- the jmxProperties
-
setJmxProperties
- Parameters:
s- the additional jmx properties to set
-
getUsername
- Returns:
- the username
-
setUsername
Set the username for accessing JMX.If both the username / password are set, then a
jmx.remote.profiles="SASL/PLAIN"is added to the environment if it doesn't already exist.- Parameters:
s- the username to set
-
getPassword
- Returns:
- the password
-
setPassword
Set the password.If both the username / password are set, then a
jmx.remote.profiles="SASL/PLAIN"is added to the environment if it doesn't already exist.- Parameters:
s- the password to set
-
getAdditionalDebug
-
setAdditionalDebug
Whether or not to generate additional TRACE level debug when attempting connections.- Parameters:
b- true to enable additional logging; default false.
-
additionalDebug
protected boolean additionalDebug() -
withJmxServiceUrl
-
withUsername
-
withPassword
-
withJmxProperties
-
withAdditionalDebug
-
withRetries
-