Package com.adaptris.jmx.remote.jms
Class JmsJmxConnectorClient
- java.lang.Object
-
- com.adaptris.jmx.remote.jms.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.JMXConnectorImplementation ofJMXConnectorthat 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 theconnect(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 correspondingJmsJmxConnectorServer.
-
-
Constructor Summary
Constructors Constructor Description JmsJmxConnectorClient(javax.management.remote.JMXServiceURL url, java.util.Map<java.lang.String,?> env, JmsJmxConnectionFactory factory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddConnectionNotificationListener(javax.management.NotificationListener listener, javax.management.NotificationFilter filter, java.lang.Object handback)voidclose()voidconnect()Establishes the connection to the connector server.voidconnect(java.util.Map env)Establishes the connection to the connector server.java.lang.StringgetConnectionId()javax.management.MBeanServerConnectiongetMBeanServerConnection()javax.management.MBeanServerConnectiongetMBeanServerConnection(javax.security.auth.Subject delegationSubject)Note that this is unsupported and will throw anUnsupportedOperationException.voidremoveConnectionNotificationListener(javax.management.NotificationListener listener)voidremoveConnectionNotificationListener(javax.management.NotificationListener l, javax.management.NotificationFilter f, java.lang.Object handback)
-
-
-
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.IOExceptionEstablishes the connection to the connector server.- Specified by:
connectin interfacejavax.management.remote.JMXConnector- Throws:
java.io.IOException
-
connect
public void connect(java.util.Map env) throws java.io.IOExceptionEstablishes the connection to the connector server.- Specified by:
connectin interfacejavax.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:
getMBeanServerConnectionin interfacejavax.management.remote.JMXConnector
-
getMBeanServerConnection
public javax.management.MBeanServerConnection getMBeanServerConnection(javax.security.auth.Subject delegationSubject)
Note that this is unsupported and will throw anUnsupportedOperationException.- Specified by:
getMBeanServerConnectionin interfacejavax.management.remote.JMXConnector
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Specified by:
closein interfacejavax.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:
addConnectionNotificationListenerin interfacejavax.management.remote.JMXConnector
-
removeConnectionNotificationListener
public void removeConnectionNotificationListener(javax.management.NotificationListener listener) throws javax.management.ListenerNotFoundException- Specified by:
removeConnectionNotificationListenerin interfacejavax.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:
removeConnectionNotificationListenerin interfacejavax.management.remote.JMXConnector- Throws:
javax.management.ListenerNotFoundException
-
getConnectionId
public java.lang.String getConnectionId()
- Specified by:
getConnectionIdin interfacejavax.management.remote.JMXConnector
-
-