Interface JmxConnectionManager

  • All Known Implementing Classes:
    DefaultConnectionManager

    public interface JmxConnectionManager
    The connection manager is responsible to create a 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.

    • Method Detail

      • connect

        JmxServerConnectionWrapper connect​(JmxConnectors connectionName,
                                           InetAddress ipAddress,
                                           Map<String,​String> connectionProperties,
                                           JmxConnectionManager.RetryCallback retryCallback)
                                    throws JmxServerConnectionException
        Connects to the given 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.

        Parameters:
        connectionName - The JmxConnectors name of the connection. May be null.
        ipAddress - the address to connect to
        connectionProperties - 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.