public abstract class AbstractJMXConnector
extends java.lang.Object
implements javax.management.remote.JMXConnector, java.io.Serializable
Modifier | Constructor and Description |
---|---|
protected |
AbstractJMXConnector(javax.management.remote.JMXServiceURL address)
Creates a new JMXConnector that will connect to the given JMXServiceURL
|
Modifier and Type | Method and Description |
---|---|
void |
addConnectionNotificationListener(javax.management.NotificationListener listener,
javax.management.NotificationFilter filter,
java.lang.Object handback) |
void |
close() |
void |
connect() |
void |
connect(java.util.Map environment) |
protected ConnectionNotificationEmitter |
createConnectionNotificationEmitter()
Creates a notification emitter used to emit connection notifications.
|
protected abstract void |
doClose()
Template method to be implemented by subclasses to close this JMXConnector
|
protected abstract void |
doConnect(java.util.Map environment) |
protected abstract javax.management.MBeanServerConnection |
doGetMBeanServerConnection(javax.security.auth.Subject delegate)
Template method to be implemented by subclasses to return an MBeanServerConnection
for the given delegate subject.
|
protected javax.management.remote.JMXServiceURL |
getAddress()
Returns the JMXServiceURL this JMXConnector will connect to.
|
protected ConnectionNotificationEmitter |
getConnectionNotificationEmitter() |
javax.management.MBeanServerConnection |
getMBeanServerConnection() |
javax.management.MBeanServerConnection |
getMBeanServerConnection(javax.security.auth.Subject delegate) |
protected boolean |
isClosed()
Returns whether the
close() method has been called. |
protected boolean |
isConnected()
Returns whether the
connect() or connect(Map) method has been called on this JMXConnector. |
void |
removeConnectionNotificationListener(javax.management.NotificationListener listener) |
void |
removeConnectionNotificationListener(javax.management.NotificationListener listener,
javax.management.NotificationFilter filter,
java.lang.Object handback) |
protected void |
sendConnectionNotificationClosed() |
protected AbstractJMXConnector(javax.management.remote.JMXServiceURL address) throws java.io.IOException
java.io.IOException
protected javax.management.remote.JMXServiceURL getAddress()
public void connect() throws java.io.IOException, java.lang.SecurityException
connect
in interface javax.management.remote.JMXConnector
java.io.IOException
java.lang.SecurityException
public void connect(java.util.Map environment) throws java.io.IOException, java.lang.SecurityException
connect
in interface javax.management.remote.JMXConnector
java.io.IOException
java.lang.SecurityException
protected abstract void doConnect(java.util.Map environment) throws java.io.IOException, java.lang.SecurityException
java.io.IOException
java.lang.SecurityException
public void close() throws java.io.IOException
close
in interface javax.management.remote.JMXConnector
java.io.IOException
protected abstract void doClose() throws java.io.IOException
java.io.IOException
public javax.management.MBeanServerConnection getMBeanServerConnection() throws java.io.IOException
getMBeanServerConnection
in interface javax.management.remote.JMXConnector
java.io.IOException
public javax.management.MBeanServerConnection getMBeanServerConnection(javax.security.auth.Subject delegate) throws java.io.IOException
getMBeanServerConnection
in interface javax.management.remote.JMXConnector
java.io.IOException
protected abstract javax.management.MBeanServerConnection doGetMBeanServerConnection(javax.security.auth.Subject delegate) throws java.io.IOException
JMXConnection
(or an equivalent client side connection object).
The JMXConnection object to which calls are delegated can in turn be a chain of
objects that decorate the call performing some other operation; the final object in
the chain is the one that really communicates with the server side, and it is normally
called 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 listener, javax.management.NotificationFilter filter, java.lang.Object handback) throws javax.management.ListenerNotFoundException
removeConnectionNotificationListener
in interface javax.management.remote.JMXConnector
javax.management.ListenerNotFoundException
protected void sendConnectionNotificationClosed()
protected ConnectionNotificationEmitter createConnectionNotificationEmitter()
protected ConnectionNotificationEmitter getConnectionNotificationEmitter()
protected boolean isConnected()
connect()
or connect(Map)
method has been called on this JMXConnector.protected boolean isClosed()
close()
method has been called.