Class JmsJmxConnectorClient

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, javax.management.remote.JMXConnector

    public class JmsJmxConnectorClient
    extends java.lang.Object
    implements javax.management.remote.JMXConnector
    Implementation of JMXConnector that provides JMX connectivity via JMS.

    It is expected that this class will be constructed using JMXConnectorFactory.newJMXConnector(JMXServiceURL, Map); rather than directly via the constructor. As the various provider (e.g. com.adaptris.jmx.remote.provider.activemq.ClientProvider) will initialise the various connection properties that are required for connecting to the JMS provider, effectively the connect(Map) method will not override any properties that have already been set in the initial set of attributes.

    Note that the getConnectionId() returned by this client is auto-generated upon each new connection attempt. It will not correspond to any information that can be retrieved from the corresponding JmsJmxConnectorServer.

    • Field Summary

      • Fields inherited from interface javax.management.remote.JMXConnector

        CREDENTIALS
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addConnectionNotificationListener​(javax.management.NotificationListener listener, javax.management.NotificationFilter filter, java.lang.Object handback)  
      void close()  
      void connect()
      Establishes the connection to the connector server.
      void connect​(java.util.Map env)
      Establishes the connection to the connector server.
      java.lang.String getConnectionId()  
      javax.management.MBeanServerConnection getMBeanServerConnection()  
      javax.management.MBeanServerConnection getMBeanServerConnection​(javax.security.auth.Subject delegationSubject)
      Note that this is unsupported and will throw an UnsupportedOperationException.
      void removeConnectionNotificationListener​(javax.management.NotificationListener listener)  
      void removeConnectionNotificationListener​(javax.management.NotificationListener l, javax.management.NotificationFilter f, java.lang.Object handback)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JmsJmxConnectorClient

        public JmsJmxConnectorClient​(javax.management.remote.JMXServiceURL url,
                                     java.util.Map<java.lang.String,​?> env,
                                     JmsJmxConnectionFactory factory)
                              throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • connect

        public void connect()
                     throws java.io.IOException
        Establishes the connection to the connector server.
        Specified by:
        connect in interface javax.management.remote.JMXConnector
        Throws:
        java.io.IOException
      • connect

        public void connect​(java.util.Map env)
                     throws java.io.IOException
        Establishes the connection to the connector server.
        Specified by:
        connect in interface javax.management.remote.JMXConnector
        Parameters:
        env - the properties of the connection. It will be ignored.
        Throws:
        java.io.IOException
      • getMBeanServerConnection

        public javax.management.MBeanServerConnection getMBeanServerConnection()
        Specified by:
        getMBeanServerConnection in interface javax.management.remote.JMXConnector
      • getMBeanServerConnection

        public javax.management.MBeanServerConnection getMBeanServerConnection​(javax.security.auth.Subject delegationSubject)
        Note that this is unsupported and will throw an UnsupportedOperationException.
        Specified by:
        getMBeanServerConnection in interface javax.management.remote.JMXConnector
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Specified by:
        close in interface javax.management.remote.JMXConnector
        Throws:
        java.io.IOException
      • addConnectionNotificationListener

        public void addConnectionNotificationListener​(javax.management.NotificationListener listener,
                                                      javax.management.NotificationFilter filter,
                                                      java.lang.Object handback)
        Specified by:
        addConnectionNotificationListener in interface javax.management.remote.JMXConnector
      • removeConnectionNotificationListener

        public void removeConnectionNotificationListener​(javax.management.NotificationListener listener)
                                                  throws javax.management.ListenerNotFoundException
        Specified by:
        removeConnectionNotificationListener in interface javax.management.remote.JMXConnector
        Throws:
        javax.management.ListenerNotFoundException
      • removeConnectionNotificationListener

        public void removeConnectionNotificationListener​(javax.management.NotificationListener l,
                                                         javax.management.NotificationFilter f,
                                                         java.lang.Object handback)
                                                  throws javax.management.ListenerNotFoundException
        Specified by:
        removeConnectionNotificationListener in interface javax.management.remote.JMXConnector
        Throws:
        javax.management.ListenerNotFoundException
      • getConnectionId

        public java.lang.String getConnectionId()
        Specified by:
        getConnectionId in interface javax.management.remote.JMXConnector