Interface JmxConnectionManager
-
- All Known Implementing Classes:
DefaultConnectionManager
public interface JmxConnectionManager
The connection manager is responsible to create aJmxServerConnector
implementation according to the connectionName and establish a connection using that server connector. If noJmxServerConnector
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 theJmxConnectionManager
may try again. If a connection manager supports retries is up to the implementation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
JmxConnectionManager.RetryCallback
This callback should always be invoked BEFORE invoking theorg.opennms.netmgt.jmx.connection.JmxServerConnector#createConnection(String, java.util.Map)
method.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description JmxServerConnectionWrapper
connect(JmxConnectors connectionName, java.net.InetAddress ipAddress, java.util.Map<java.lang.String,java.lang.String> connectionProperties, JmxConnectionManager.RetryCallback retryCallback)
-
-
-
Method Detail
-
connect
JmxServerConnectionWrapper connect(JmxConnectors connectionName, java.net.InetAddress ipAddress, java.util.Map<java.lang.String,java.lang.String> connectionProperties, JmxConnectionManager.RetryCallback retryCallback) throws JmxServerConnectionException
Connects to the givenipAddress
using theJmxServerConnector
registered withconnectionString
. If the connection to the server could not be established (e.g. no retries left) a JmxServerConnectionException is thrown.- Parameters:
connectionName
- TheJmxConnectors
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.- Returns:
- A JmxServerConnectionWrapper for the MBeanServerConnection.
- Throws:
JmxServerConnectionException
- if the connection to the given ipAddress using the registered JmxServerConnector could not be established.
-
-