public class DefaultConnectionManager extends Object implements JmxConnectionManager
JmxConnectionManager.RetryCallback
Constructor and Description |
---|
DefaultConnectionManager()
Same as
DefaultConnectionManager(int) with a retryCount = 3 . |
DefaultConnectionManager(int retryCount) |
Modifier and Type | Method and Description |
---|---|
JmxServerConnectionWrapper |
connect(JmxConnectors connectorName,
InetAddress ipAddress,
Map<String,String> properties,
JmxConnectionManager.RetryCallback retryCallback)
|
JmxServerConnector |
getConnector(JmxConnectors connectorName)
Access-Method for the
connectorMap . |
public DefaultConnectionManager(int retryCount)
retryCount
- Any value >= 1. If <= 0, 3 is used.public DefaultConnectionManager()
DefaultConnectionManager(int)
with a retryCount = 3
.public JmxServerConnectionWrapper connect(JmxConnectors connectorName, InetAddress ipAddress, Map<String,String> properties, JmxConnectionManager.RetryCallback retryCallback) throws JmxServerConnectionException
JmxConnectionManager
ipAddress
using the
JmxServerConnector
registered with connectionString
.
If the connection to the server could not be established (e.g. no retries left) a JmxServerConnectionException is thrown.connect
in interface JmxConnectionManager
connectorName
- The JmxConnectors
name of the connection. May be null.ipAddress
- the address to connect toproperties
- properties for the connection (e.g. port, user, etc.)retryCallback
- A callback, which should be called BEFORE creating the connection. May be null.JmxServerConnectionException
- if the connection to the given ipAddress using the registered JmxServerConnector could not be established.public JmxServerConnector getConnector(JmxConnectors connectorName) throws JmxServerConnectionException
connectorMap
.connectorName
- JmxServerConnectionException
Copyright © 2016. All rights reserved.