Interface JmxConnectionManager
-
- All Known Implementing Classes:
DefaultConnectionManager
public interface JmxConnectionManagerThe connection manager is responsible to create aJmxServerConnectorimplementation according to the connectionName and establish a connection using that server connector. If noJmxServerConnectorcould 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 theJmxConnectionManagermay try again. If a connection manager supports retries is up to the implementation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceJmxConnectionManager.RetryCallbackThis 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 JmxServerConnectionWrapperconnect(JmxConnectors connectionName, InetAddress ipAddress, Map<String,String> connectionProperties, JmxConnectionManager.RetryCallback retryCallback)
-
-
-
Method Detail
-
connect
JmxServerConnectionWrapper connect(JmxConnectors connectionName, InetAddress ipAddress, Map<String,String> connectionProperties, JmxConnectionManager.RetryCallback retryCallback) throws JmxServerConnectionException
Connects to the givenipAddressusing theJmxServerConnectorregistered withconnectionString. If the connection to the server could not be established (e.g. no retries left) a JmxServerConnectionException is thrown.- Parameters:
connectionName- TheJmxConnectorsname 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.
-
-