mx4j.tools.remote

Class AbstractJMXConnector

public abstract class AbstractJMXConnector extends Object implements JMXConnector, Serializable

Abstract implementation of the JMXConnector interface. It gives support for emitting connection notifications and implements JMXConnector methods using the template method pattern.

Version: $Revision: 1.8 $

Constructor Summary
protected AbstractJMXConnector(JMXServiceURL address)
Creates a new JMXConnector that will connect to the given JMXServiceURL
Method Summary
voidaddConnectionNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback)
voidclose()
voidconnect()
voidconnect(Map environment)
protected ConnectionNotificationEmittercreateConnectionNotificationEmitter()
Creates a notification emitter used to emit connection notifications.
protected abstract voiddoClose()
Template method to be implemented by subclasses to close this JMXConnector
protected abstract voiddoConnect(Map environment)
protected abstract MBeanServerConnectiondoGetMBeanServerConnection(Subject delegate)
Template method to be implemented by subclasses to return an MBeanServerConnection for the given delegate subject.
protected JMXServiceURLgetAddress()
Returns the JMXServiceURL this JMXConnector will connect to.
protected ConnectionNotificationEmittergetConnectionNotificationEmitter()
MBeanServerConnectiongetMBeanServerConnection()
MBeanServerConnectiongetMBeanServerConnection(Subject delegate)
protected booleanisClosed()
Returns whether the AbstractJMXConnector method has been called.
protected booleanisConnected()
Returns whether the AbstractJMXConnector or connect method has been called on this JMXConnector.
voidremoveConnectionNotificationListener(NotificationListener listener)
voidremoveConnectionNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback)
protected voidsendConnectionNotificationClosed()

Constructor Detail

AbstractJMXConnector

protected AbstractJMXConnector(JMXServiceURL address)
Creates a new JMXConnector that will connect to the given JMXServiceURL

Method Detail

addConnectionNotificationListener

public void addConnectionNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback)

close

public void close()

connect

public void connect()

connect

public void connect(Map environment)

createConnectionNotificationEmitter

protected ConnectionNotificationEmitter createConnectionNotificationEmitter()
Creates a notification emitter used to emit connection notifications. This method is called once per JMXConnector.

doClose

protected abstract void doClose()
Template method to be implemented by subclasses to close this JMXConnector

doConnect

protected abstract void doConnect(Map environment)

doGetMBeanServerConnection

protected abstract MBeanServerConnection doGetMBeanServerConnection(Subject delegate)
Template method to be implemented by subclasses to return an MBeanServerConnection for the given delegate subject. This method should return an MBeanServerConnection that delegates method calls to a 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 ClientInvoker.

getAddress

protected JMXServiceURL getAddress()
Returns the JMXServiceURL this JMXConnector will connect to.

getConnectionNotificationEmitter

protected ConnectionNotificationEmitter getConnectionNotificationEmitter()

getMBeanServerConnection

public MBeanServerConnection getMBeanServerConnection()

getMBeanServerConnection

public MBeanServerConnection getMBeanServerConnection(Subject delegate)

isClosed

protected boolean isClosed()
Returns whether the AbstractJMXConnector method has been called.

isConnected

protected boolean isConnected()
Returns whether the AbstractJMXConnector or connect method has been called on this JMXConnector.

removeConnectionNotificationListener

public void removeConnectionNotificationListener(NotificationListener listener)

removeConnectionNotificationListener

public void removeConnectionNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback)

sendConnectionNotificationClosed

protected void sendConnectionNotificationClosed()
Copyright © 2001-2005 The MX4J Contributors. All Rights Reserved.