public class JmsJmxConnectorClient
extends java.lang.Object
implements javax.management.remote.JMXConnector
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. 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
.
Constructor and Description |
---|
JmsJmxConnectorClient(javax.management.remote.JMXServiceURL url,
java.util.Map<java.lang.String,?> env,
JmsJmxConnectionFactory factory) |
Modifier and Type | Method and 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) |
public JmsJmxConnectorClient(javax.management.remote.JMXServiceURL url, java.util.Map<java.lang.String,?> env, JmsJmxConnectionFactory factory) throws java.io.IOException
java.io.IOException
public void connect() throws java.io.IOException
connect
in interface javax.management.remote.JMXConnector
java.io.IOException
public void connect(java.util.Map env) throws java.io.IOException
connect
in interface javax.management.remote.JMXConnector
env
- the properties of the connection. It will be ignored.java.io.IOException
public javax.management.MBeanServerConnection getMBeanServerConnection()
getMBeanServerConnection
in interface javax.management.remote.JMXConnector
public javax.management.MBeanServerConnection getMBeanServerConnection(javax.security.auth.Subject delegationSubject)
UnsupportedOperationException
.getMBeanServerConnection
in interface javax.management.remote.JMXConnector
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in interface javax.management.remote.JMXConnector
java.io.IOException
public void addConnectionNotificationListener(javax.management.NotificationListener listener, javax.management.NotificationFilter filter, java.lang.Object handback)
addConnectionNotificationListener
in interface javax.management.remote.JMXConnector
public void removeConnectionNotificationListener(javax.management.NotificationListener listener) throws javax.management.ListenerNotFoundException
removeConnectionNotificationListener
in interface javax.management.remote.JMXConnector
javax.management.ListenerNotFoundException
public void removeConnectionNotificationListener(javax.management.NotificationListener l, javax.management.NotificationFilter f, java.lang.Object handback) throws javax.management.ListenerNotFoundException
removeConnectionNotificationListener
in interface javax.management.remote.JMXConnector
javax.management.ListenerNotFoundException
public java.lang.String getConnectionId()
getConnectionId
in interface javax.management.remote.JMXConnector