public interface JmxConnectionManager
JmxServerConnector
implementation according to the connectionName and establish a connection using that server connector.
If no JmxServerConnector
could be used for a given
connectionName the error handling is up to the implementation.
If a connection to a JMX Server could not be established the JmxConnectionManager
may try again.
If a connection manager supports retries is up to the implementation.Modifier and Type | Interface and Description |
---|---|
static interface |
JmxConnectionManager.RetryCallback
This callback should always be invoked BEFORE invoking
the
org.opennms.netmgt.jmx.connection.JmxServerConnector#createConnection(String, java.util.Map)
method. |
Modifier and Type | Method and Description |
---|---|
JmxServerConnectionWrapper |
connect(JmxConnectors connectionName,
InetAddress ipAddress,
Map<String,String> connectionProperties,
JmxConnectionManager.RetryCallback retryCallback)
|
JmxServerConnectionWrapper connect(JmxConnectors connectionName, InetAddress ipAddress, Map<String,String> connectionProperties, JmxConnectionManager.RetryCallback retryCallback) throws JmxServerConnectionException
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.connectionName
- The JmxConnectors
name of the connection. May be null.ipAddress
- the address to connect toconnectionProperties
- 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.Copyright © 2021. All rights reserved.