javax.management.remote
Class JMXConnectorServer

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.management.NotificationBroadcasterSupport sample code for javax.management.NotificationBroadcasterSupport definition code for javax.management.NotificationBroadcasterSupport 
      extended by javax.management.remote.JMXConnectorServer
All Implemented Interfaces:
MBeanRegistration sample code for javax.management.MBeanRegistration definition code for javax.management.MBeanRegistration , NotificationBroadcaster sample code for javax.management.NotificationBroadcaster definition code for javax.management.NotificationBroadcaster , NotificationEmitter sample code for javax.management.NotificationEmitter definition code for javax.management.NotificationEmitter , JMXConnectorServerMBean sample code for javax.management.remote.JMXConnectorServerMBean definition code for javax.management.remote.JMXConnectorServerMBean
Direct Known Subclasses:
RMIConnectorServer sample code for javax.management.remote.rmi.RMIConnectorServer definition code for javax.management.remote.rmi.RMIConnectorServer

public abstract class JMXConnectorServer
extends NotificationBroadcasterSupport sample code for javax.management.NotificationBroadcasterSupport definition code for javax.management.NotificationBroadcasterSupport
implements JMXConnectorServerMBean sample code for javax.management.remote.JMXConnectorServerMBean definition code for javax.management.remote.JMXConnectorServerMBean , MBeanRegistration sample code for javax.management.MBeanRegistration definition code for javax.management.MBeanRegistration

Superclass of every connector server. A connector server is attached to an MBean server. It listens for client connection requests and creates a connection for each one.

A connector server is associated with an MBean server either by registering it in that MBean server, or by passing the MBean server to its constructor.

A connector server is inactive when created. It only starts listening for client connections when the start sample code for javax.management.remote.JMXConnectorServerMBean.start() definition code for javax.management.remote.JMXConnectorServerMBean.start() method is called. A connector server stops listening for client connections when the stop sample code for javax.management.remote.JMXConnectorServerMBean.stop() definition code for javax.management.remote.JMXConnectorServerMBean.stop() method is called or when the connector server is unregistered from its MBean server.

Stopping a connector server does not unregister it from its MBean server. A connector server once stopped cannot be restarted.

Each time a client connection is made or broken, a notification of class JMXConnectionNotification sample code for javax.management.remote.JMXConnectionNotification definition code for javax.management.remote.JMXConnectionNotification is emitted.

Since:
1.5

Field Summary
static String sample code for java.lang.String definition code for java.lang.String AUTHENTICATOR sample code for javax.management.remote.JMXConnectorServer.AUTHENTICATOR definition code for javax.management.remote.JMXConnectorServer.AUTHENTICATOR
          Name of the attribute that specifies the authenticator for a connector server.
 
Constructor Summary
JMXConnectorServer sample code for javax.management.remote.JMXConnectorServer.JMXConnectorServer() definition code for javax.management.remote.JMXConnectorServer.JMXConnectorServer() ()
          Constructs a connector server that will be registered as an MBean in the MBean server it is attached to.
JMXConnectorServer sample code for javax.management.remote.JMXConnectorServer.JMXConnectorServer(javax.management.MBeanServer) definition code for javax.management.remote.JMXConnectorServer.JMXConnectorServer(javax.management.MBeanServer) (MBeanServer sample code for javax.management.MBeanServer definition code for javax.management.MBeanServer  mbeanServer)
          Constructs a connector server that is attached to the given MBean server.
 
Method Summary
protected  void connectionClosed sample code for javax.management.remote.JMXConnectorServer.connectionClosed(java.lang.String, java.lang.String, java.lang.Object) definition code for javax.management.remote.JMXConnectorServer.connectionClosed(java.lang.String, java.lang.String, java.lang.Object) (String sample code for java.lang.String definition code for java.lang.String  connectionId, String sample code for java.lang.String definition code for java.lang.String  message, Object sample code for java.lang.Object definition code for java.lang.Object  userData)
          Called by a subclass when a client connection is closed normally.
protected  void connectionFailed sample code for javax.management.remote.JMXConnectorServer.connectionFailed(java.lang.String, java.lang.String, java.lang.Object) definition code for javax.management.remote.JMXConnectorServer.connectionFailed(java.lang.String, java.lang.String, java.lang.Object) (String sample code for java.lang.String definition code for java.lang.String  connectionId, String sample code for java.lang.String definition code for java.lang.String  message, Object sample code for java.lang.Object definition code for java.lang.Object  userData)
          Called by a subclass when a client connection fails.
protected  void connectionOpened sample code for javax.management.remote.JMXConnectorServer.connectionOpened(java.lang.String, java.lang.String, java.lang.Object) definition code for javax.management.remote.JMXConnectorServer.connectionOpened(java.lang.String, java.lang.String, java.lang.Object) (String sample code for java.lang.String definition code for java.lang.String  connectionId, String sample code for java.lang.String definition code for java.lang.String  message, Object sample code for java.lang.Object definition code for java.lang.Object  userData)
          Called by a subclass when a new client connection is opened.
 String sample code for java.lang.String definition code for java.lang.String [] getConnectionIds sample code for javax.management.remote.JMXConnectorServer.getConnectionIds() definition code for javax.management.remote.JMXConnectorServer.getConnectionIds() ()
          The list of IDs for currently-open connections to this connector server.
 MBeanServer sample code for javax.management.MBeanServer definition code for javax.management.MBeanServer getMBeanServer sample code for javax.management.remote.JMXConnectorServer.getMBeanServer() definition code for javax.management.remote.JMXConnectorServer.getMBeanServer() ()
          Returns the MBean server that this connector server is attached to.
 MBeanNotificationInfo sample code for javax.management.MBeanNotificationInfo definition code for javax.management.MBeanNotificationInfo [] getNotificationInfo sample code for javax.management.remote.JMXConnectorServer.getNotificationInfo() definition code for javax.management.remote.JMXConnectorServer.getNotificationInfo() ()
          Returns an array indicating the notifications that this MBean sends.
 void postDeregister sample code for javax.management.remote.JMXConnectorServer.postDeregister() definition code for javax.management.remote.JMXConnectorServer.postDeregister() ()
          Allows the MBean to perform any operations needed after having been unregistered in the MBean server.
 void postRegister sample code for javax.management.remote.JMXConnectorServer.postRegister(java.lang.Boolean) definition code for javax.management.remote.JMXConnectorServer.postRegister(java.lang.Boolean) (Boolean sample code for java.lang.Boolean definition code for java.lang.Boolean  registrationDone)
          Allows the MBean to perform any operations needed after having been registered in the MBean server or after the registration has failed.
 void preDeregister sample code for javax.management.remote.JMXConnectorServer.preDeregister() definition code for javax.management.remote.JMXConnectorServer.preDeregister() ()
          Called by an MBean server when this connector server is unregistered from that MBean server.
 ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName preRegister sample code for javax.management.remote.JMXConnectorServer.preRegister(javax.management.MBeanServer, javax.management.ObjectName) definition code for javax.management.remote.JMXConnectorServer.preRegister(javax.management.MBeanServer, javax.management.ObjectName) (MBeanServer sample code for javax.management.MBeanServer definition code for javax.management.MBeanServer  mbs, ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  name)
          Called by an MBean server when this connector server is registered in that MBean server.
 void setMBeanServerForwarder sample code for javax.management.remote.JMXConnectorServer.setMBeanServerForwarder(javax.management.remote.MBeanServerForwarder) definition code for javax.management.remote.JMXConnectorServer.setMBeanServerForwarder(javax.management.remote.MBeanServerForwarder) (MBeanServerForwarder sample code for javax.management.remote.MBeanServerForwarder definition code for javax.management.remote.MBeanServerForwarder  mbsf)
          Adds an object that intercepts requests for the MBean server that arrive through this connector server.
 JMXConnector sample code for javax.management.remote.JMXConnector definition code for javax.management.remote.JMXConnector toJMXConnector sample code for javax.management.remote.JMXConnectorServer.toJMXConnector(java.util.Map) definition code for javax.management.remote.JMXConnectorServer.toJMXConnector(java.util.Map) (Map sample code for java.util.Map definition code for java.util.Map <String sample code for java.lang.String definition code for java.lang.String ,?> env)
          Returns a client stub for this connector server.
 
Methods inherited from class javax.management.NotificationBroadcasterSupport sample code for javax.management.NotificationBroadcasterSupport definition code for javax.management.NotificationBroadcasterSupport
addNotificationListener sample code for javax.management.NotificationBroadcasterSupport.addNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) definition code for javax.management.NotificationBroadcasterSupport.addNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) , handleNotification sample code for javax.management.NotificationBroadcasterSupport.handleNotification(javax.management.NotificationListener, javax.management.Notification, java.lang.Object) definition code for javax.management.NotificationBroadcasterSupport.handleNotification(javax.management.NotificationListener, javax.management.Notification, java.lang.Object) , removeNotificationListener sample code for javax.management.NotificationBroadcasterSupport.removeNotificationListener(javax.management.NotificationListener) definition code for javax.management.NotificationBroadcasterSupport.removeNotificationListener(javax.management.NotificationListener) , removeNotificationListener sample code for javax.management.NotificationBroadcasterSupport.removeNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) definition code for javax.management.NotificationBroadcasterSupport.removeNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) , sendNotification sample code for javax.management.NotificationBroadcasterSupport.sendNotification(javax.management.Notification) definition code for javax.management.NotificationBroadcasterSupport.sendNotification(javax.management.Notification)
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 
Methods inherited from interface javax.management.remote.JMXConnectorServerMBean sample code for javax.management.remote.JMXConnectorServerMBean definition code for javax.management.remote.JMXConnectorServerMBean
getAddress sample code for javax.management.remote.JMXConnectorServerMBean.getAddress() definition code for javax.management.remote.JMXConnectorServerMBean.getAddress() , getAttributes sample code for javax.management.remote.JMXConnectorServerMBean.getAttributes() definition code for javax.management.remote.JMXConnectorServerMBean.getAttributes() , isActive sample code for javax.management.remote.JMXConnectorServerMBean.isActive() definition code for javax.management.remote.JMXConnectorServerMBean.isActive() , start sample code for javax.management.remote.JMXConnectorServerMBean.start() definition code for javax.management.remote.JMXConnectorServerMBean.start() , stop sample code for javax.management.remote.JMXConnectorServerMBean.stop() definition code for javax.management.remote.JMXConnectorServerMBean.stop()
 

Field Detail

AUTHENTICATOR sample code for javax.management.remote.JMXConnectorServer.AUTHENTICATOR

public static final String sample code for java.lang.String definition code for java.lang.String  AUTHENTICATOR

Name of the attribute that specifies the authenticator for a connector server. The value associated with this attribute, if any, must be an object that implements the interface JMXAuthenticator sample code for javax.management.remote.JMXAuthenticator definition code for javax.management.remote.JMXAuthenticator .

See Also:
Constant Field Values
Constructor Detail

JMXConnectorServer sample code for javax.management.remote.JMXConnectorServer() definition code for javax.management.remote.JMXConnectorServer()

public JMXConnectorServer()

Constructs a connector server that will be registered as an MBean in the MBean server it is attached to. This constructor is typically called by one of the createMBean methods when creating, within an MBean server, a connector server that makes it available remotely.


JMXConnectorServer sample code for javax.management.remote.JMXConnectorServer(javax.management.MBeanServer) definition code for javax.management.remote.JMXConnectorServer(javax.management.MBeanServer)

public JMXConnectorServer(MBeanServer sample code for javax.management.MBeanServer definition code for javax.management.MBeanServer  mbeanServer)

Constructs a connector server that is attached to the given MBean server. A connector server that is created in this way can be registered in a different MBean server.

Parameters:
mbeanServer - the MBean server that this connector server is attached to. Null if this connector server will be attached to an MBean server by being registered in it.
Method Detail

getMBeanServer sample code for javax.management.remote.JMXConnectorServer.getMBeanServer() definition code for javax.management.remote.JMXConnectorServer.getMBeanServer()

public MBeanServer sample code for javax.management.MBeanServer definition code for javax.management.MBeanServer  getMBeanServer()

Returns the MBean server that this connector server is attached to.

Returns:
the MBean server that this connector server is attached to, or null if it is not yet attached to an MBean server.

setMBeanServerForwarder sample code for javax.management.remote.JMXConnectorServer.setMBeanServerForwarder(javax.management.remote.MBeanServerForwarder) definition code for javax.management.remote.JMXConnectorServer.setMBeanServerForwarder(javax.management.remote.MBeanServerForwarder)

public void setMBeanServerForwarder(MBeanServerForwarder sample code for javax.management.remote.MBeanServerForwarder definition code for javax.management.remote.MBeanServerForwarder  mbsf)
Description copied from interface: JMXConnectorServerMBean sample code for javax.management.remote.JMXConnectorServerMBean.setMBeanServerForwarder(javax.management.remote.MBeanServerForwarder) definition code for javax.management.remote.JMXConnectorServerMBean.setMBeanServerForwarder(javax.management.remote.MBeanServerForwarder)

Adds an object that intercepts requests for the MBean server that arrive through this connector server. This object will be supplied as the MBeanServer for any new connection created by this connector server. Existing connections are unaffected.

If this connector server is already associated with an MBeanServer object, then that object is given to mbsf.setMBeanServer sample code for javax.management.remote.MBeanServerForwarder.setMBeanServer(javax.management.MBeanServer) definition code for javax.management.remote.MBeanServerForwarder.setMBeanServer(javax.management.MBeanServer) . If doing so produces an exception, this method throws the same exception without any other effect.

If this connector is not already associated with an MBeanServer object, or if the mbsf.setMBeanServer call just mentioned succeeds, then mbsf becomes this connector server's MBeanServer.

Specified by:
setMBeanServerForwarder sample code for javax.management.remote.JMXConnectorServerMBean.setMBeanServerForwarder(javax.management.remote.MBeanServerForwarder) definition code for javax.management.remote.JMXConnectorServerMBean.setMBeanServerForwarder(javax.management.remote.MBeanServerForwarder) in interface JMXConnectorServerMBean sample code for javax.management.remote.JMXConnectorServerMBean definition code for javax.management.remote.JMXConnectorServerMBean
Parameters:
mbsf - the new MBeanServerForwarder.

getConnectionIds sample code for javax.management.remote.JMXConnectorServer.getConnectionIds() definition code for javax.management.remote.JMXConnectorServer.getConnectionIds()

public String sample code for java.lang.String definition code for java.lang.String [] getConnectionIds()
Description copied from interface: JMXConnectorServerMBean sample code for javax.management.remote.JMXConnectorServerMBean.getConnectionIds() definition code for javax.management.remote.JMXConnectorServerMBean.getConnectionIds()

The list of IDs for currently-open connections to this connector server.

Specified by:
getConnectionIds sample code for javax.management.remote.JMXConnectorServerMBean.getConnectionIds() definition code for javax.management.remote.JMXConnectorServerMBean.getConnectionIds() in interface JMXConnectorServerMBean sample code for javax.management.remote.JMXConnectorServerMBean definition code for javax.management.remote.JMXConnectorServerMBean
Returns:
a new string array containing the list of IDs. If there are no currently-open connections, this array will be empty.

toJMXConnector sample code for javax.management.remote.JMXConnectorServer.toJMXConnector(java.util.Map<java.lang.String, ?>) definition code for javax.management.remote.JMXConnectorServer.toJMXConnector(java.util.Map<java.lang.String, ?>)

public JMXConnector sample code for javax.management.remote.JMXConnector definition code for javax.management.remote.JMXConnector  toJMXConnector(Map sample code for java.util.Map definition code for java.util.Map <String sample code for java.lang.String definition code for java.lang.String ,?> env)
                            throws IOException sample code for java.io.IOException definition code for java.io.IOException 

Returns a client stub for this connector server. A client stub is a serializable object whose connect sample code for javax.management.remote.JMXConnector.connect(java.util.Map) definition code for javax.management.remote.JMXConnector.connect(java.util.Map) method can be used to make one new connection to this connector server.

A given connector need not support the generation of client stubs. However, the connectors specified by the JMX Remote API do (JMXMP Connector and RMI Connector).

The default implementation of this method uses JMXConnectorServerMBean.getAddress() sample code for javax.management.remote.JMXConnectorServerMBean.getAddress() definition code for javax.management.remote.JMXConnectorServerMBean.getAddress() and JMXConnectorFactory sample code for javax.management.remote.JMXConnectorFactory definition code for javax.management.remote.JMXConnectorFactory to generate the stub, with code equivalent to the following:

 JMXServiceURL addr = getAddress() sample code for javax.management.remote.JMXConnectorServerMBean.getAddress() definition code for javax.management.remote.JMXConnectorServerMBean.getAddress() ;
 return JMXConnectorFactory.newJMXConnector(addr, env) sample code for javax.management.remote.JMXConnectorFactory.newJMXConnector(javax.management.remote.JMXServiceURL, java.util.Map) definition code for javax.management.remote.JMXConnectorFactory.newJMXConnector(javax.management.remote.JMXServiceURL, java.util.Map) ;
 

A connector server for which this is inappropriate must override this method so that it either implements the appropriate logic or throws UnsupportedOperationException sample code for java.lang.UnsupportedOperationException definition code for java.lang.UnsupportedOperationException .

Specified by:
toJMXConnector sample code for javax.management.remote.JMXConnectorServerMBean.toJMXConnector(java.util.Map) definition code for javax.management.remote.JMXConnectorServerMBean.toJMXConnector(java.util.Map) in interface JMXConnectorServerMBean sample code for javax.management.remote.JMXConnectorServerMBean definition code for javax.management.remote.JMXConnectorServerMBean
Parameters:
env - client connection parameters of the same sort that could be provided to JMXConnector.connect(Map) sample code for javax.management.remote.JMXConnector.connect(java.util.Map) definition code for javax.management.remote.JMXConnector.connect(java.util.Map) . Can be null, which is equivalent to an empty map.
Returns:
a client stub that can be used to make a new connection to this connector server.
Throws:
UnsupportedOperationException sample code for java.lang.UnsupportedOperationException definition code for java.lang.UnsupportedOperationException - if this connector server does not support the generation of client stubs.
IllegalStateException sample code for java.lang.IllegalStateException definition code for java.lang.IllegalStateException - if the JMXConnectorServer is not started (see JMXConnectorServerMBean.isActive() sample code for javax.management.remote.JMXConnectorServerMBean.isActive() definition code for javax.management.remote.JMXConnectorServerMBean.isActive() ).
IOException sample code for java.io.IOException definition code for java.io.IOException - if a communications problem means that a stub cannot be created.

getNotificationInfo sample code for javax.management.remote.JMXConnectorServer.getNotificationInfo() definition code for javax.management.remote.JMXConnectorServer.getNotificationInfo()

public MBeanNotificationInfo sample code for javax.management.MBeanNotificationInfo definition code for javax.management.MBeanNotificationInfo [] getNotificationInfo()

Returns an array indicating the notifications that this MBean sends. The implementation in JMXConnectorServer returns an array with one element, indicating that it can emit notifications of class JMXConnectionNotification sample code for javax.management.remote.JMXConnectionNotification definition code for javax.management.remote.JMXConnectionNotification with the types defined in that class. A subclass that can emit other notifications should return an array that contains this element plus descriptions of the other notifications.

Specified by:
getNotificationInfo sample code for javax.management.NotificationBroadcaster.getNotificationInfo() definition code for javax.management.NotificationBroadcaster.getNotificationInfo() in interface NotificationBroadcaster sample code for javax.management.NotificationBroadcaster definition code for javax.management.NotificationBroadcaster
Overrides:
getNotificationInfo sample code for javax.management.NotificationBroadcasterSupport.getNotificationInfo() definition code for javax.management.NotificationBroadcasterSupport.getNotificationInfo() in class NotificationBroadcasterSupport sample code for javax.management.NotificationBroadcasterSupport definition code for javax.management.NotificationBroadcasterSupport
Returns:
the array of possible notifications.

connectionOpened sample code for javax.management.remote.JMXConnectorServer.connectionOpened(java.lang.String, java.lang.String, java.lang.Object) definition code for javax.management.remote.JMXConnectorServer.connectionOpened(java.lang.String, java.lang.String, java.lang.Object)

protected void connectionOpened(String sample code for java.lang.String definition code for java.lang.String  connectionId,
                                String sample code for java.lang.String definition code for java.lang.String  message,
                                Object sample code for java.lang.Object definition code for java.lang.Object  userData)

Called by a subclass when a new client connection is opened. Adds connectionId to the list returned by getConnectionIds() sample code for javax.management.remote.JMXConnectorServer.getConnectionIds() definition code for javax.management.remote.JMXConnectorServer.getConnectionIds() , then emits a JMXConnectionNotification sample code for javax.management.remote.JMXConnectionNotification definition code for javax.management.remote.JMXConnectionNotification with type JMXConnectionNotification.OPENED sample code for javax.management.remote.JMXConnectionNotification.OPENED definition code for javax.management.remote.JMXConnectionNotification.OPENED .

Parameters:
connectionId - the ID of the new connection. This must be different from the ID of any connection previously opened by this connector server.
message - the message for the emitted JMXConnectionNotification sample code for javax.management.remote.JMXConnectionNotification definition code for javax.management.remote.JMXConnectionNotification . Can be null. See Notification.getMessage() sample code for javax.management.Notification.getMessage() definition code for javax.management.Notification.getMessage() .
userData - the userData for the emitted JMXConnectionNotification sample code for javax.management.remote.JMXConnectionNotification definition code for javax.management.remote.JMXConnectionNotification . Can be null. See Notification.getUserData() sample code for javax.management.Notification.getUserData() definition code for javax.management.Notification.getUserData() .
Throws:
NullPointerException sample code for java.lang.NullPointerException definition code for java.lang.NullPointerException - if connectionId is null.

connectionClosed sample code for javax.management.remote.JMXConnectorServer.connectionClosed(java.lang.String, java.lang.String, java.lang.Object) definition code for javax.management.remote.JMXConnectorServer.connectionClosed(java.lang.String, java.lang.String, java.lang.Object)

protected void connectionClosed(String sample code for java.lang.String definition code for java.lang.String  connectionId,
                                String sample code for java.lang.String definition code for java.lang.String  message,
                                Object sample code for java.lang.Object definition code for java.lang.Object  userData)

Called by a subclass when a client connection is closed normally. Removes connectionId from the list returned by getConnectionIds() sample code for javax.management.remote.JMXConnectorServer.getConnectionIds() definition code for javax.management.remote.JMXConnectorServer.getConnectionIds() , then emits a JMXConnectionNotification sample code for javax.management.remote.JMXConnectionNotification definition code for javax.management.remote.JMXConnectionNotification with type JMXConnectionNotification.CLOSED sample code for javax.management.remote.JMXConnectionNotification.CLOSED definition code for javax.management.remote.JMXConnectionNotification.CLOSED .

Parameters:
connectionId - the ID of the closed connection.
message - the message for the emitted JMXConnectionNotification sample code for javax.management.remote.JMXConnectionNotification definition code for javax.management.remote.JMXConnectionNotification . Can be null. See Notification.getMessage() sample code for javax.management.Notification.getMessage() definition code for javax.management.Notification.getMessage() .
userData - the userData for the emitted JMXConnectionNotification sample code for javax.management.remote.JMXConnectionNotification definition code for javax.management.remote.JMXConnectionNotification . Can be null. See Notification.getUserData() sample code for javax.management.Notification.getUserData() definition code for javax.management.Notification.getUserData() .
Throws:
NullPointerException sample code for java.lang.NullPointerException definition code for java.lang.NullPointerException - if connectionId is null.

connectionFailed sample code for javax.management.remote.JMXConnectorServer.connectionFailed(java.lang.String, java.lang.String, java.lang.Object) definition code for javax.management.remote.JMXConnectorServer.connectionFailed(java.lang.String, java.lang.String, java.lang.Object)

protected void connectionFailed(String sample code for java.lang.String definition code for java.lang.String  connectionId,
                                String sample code for java.lang.String definition code for java.lang.String  message,
                                Object sample code for java.lang.Object definition code for java.lang.Object  userData)

Called by a subclass when a client connection fails. Removes connectionId from the list returned by getConnectionIds() sample code for javax.management.remote.JMXConnectorServer.getConnectionIds() definition code for javax.management.remote.JMXConnectorServer.getConnectionIds() , then emits a JMXConnectionNotification sample code for javax.management.remote.JMXConnectionNotification definition code for javax.management.remote.JMXConnectionNotification with type JMXConnectionNotification.FAILED sample code for javax.management.remote.JMXConnectionNotification.FAILED definition code for javax.management.remote.JMXConnectionNotification.FAILED .

Parameters:
connectionId - the ID of the failed connection.
message - the message for the emitted JMXConnectionNotification sample code for javax.management.remote.JMXConnectionNotification definition code for javax.management.remote.JMXConnectionNotification . Can be null. See Notification.getMessage() sample code for javax.management.Notification.getMessage() definition code for javax.management.Notification.getMessage() .
userData - the userData for the emitted JMXConnectionNotification sample code for javax.management.remote.JMXConnectionNotification definition code for javax.management.remote.JMXConnectionNotification . Can be null. See Notification.getUserData() sample code for javax.management.Notification.getUserData() definition code for javax.management.Notification.getUserData() .
Throws:
NullPointerException sample code for java.lang.NullPointerException definition code for java.lang.NullPointerException - if connectionId is null.

preRegister sample code for javax.management.remote.JMXConnectorServer.preRegister(javax.management.MBeanServer, javax.management.ObjectName) definition code for javax.management.remote.JMXConnectorServer.preRegister(javax.management.MBeanServer, javax.management.ObjectName)

public ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  preRegister(MBeanServer sample code for javax.management.MBeanServer definition code for javax.management.MBeanServer  mbs,
                              ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  name)

Called by an MBean server when this connector server is registered in that MBean server. This connector server becomes attached to the MBean server and its getMBeanServer() sample code for javax.management.remote.JMXConnectorServer.getMBeanServer() definition code for javax.management.remote.JMXConnectorServer.getMBeanServer() method will return mbs.

If this connector server is already attached to an MBean server, this method has no effect. The MBean server it is attached to is not necessarily the one it is being registered in.

Specified by:
preRegister sample code for javax.management.MBeanRegistration.preRegister(javax.management.MBeanServer, javax.management.ObjectName) definition code for javax.management.MBeanRegistration.preRegister(javax.management.MBeanServer, javax.management.ObjectName) in interface MBeanRegistration sample code for javax.management.MBeanRegistration definition code for javax.management.MBeanRegistration
Parameters:
mbs - the MBean server in which this connection server is being registered.
name - The object name of the MBean.
Returns:
The name under which the MBean is to be registered.
Throws:
NullPointerException sample code for java.lang.NullPointerException definition code for java.lang.NullPointerException - if mbs or name is null.

postRegister sample code for javax.management.remote.JMXConnectorServer.postRegister(java.lang.Boolean) definition code for javax.management.remote.JMXConnectorServer.postRegister(java.lang.Boolean)

public void postRegister(Boolean sample code for java.lang.Boolean definition code for java.lang.Boolean  registrationDone)
Description copied from interface: MBeanRegistration sample code for javax.management.MBeanRegistration.postRegister(java.lang.Boolean) definition code for javax.management.MBeanRegistration.postRegister(java.lang.Boolean)
Allows the MBean to perform any operations needed after having been registered in the MBean server or after the registration has failed.

Specified by:
postRegister sample code for javax.management.MBeanRegistration.postRegister(java.lang.Boolean) definition code for javax.management.MBeanRegistration.postRegister(java.lang.Boolean) in interface MBeanRegistration sample code for javax.management.MBeanRegistration definition code for javax.management.MBeanRegistration
Parameters:
registrationDone - Indicates whether or not the MBean has been successfully registered in the MBean server. The value false means that the registration phase has failed.

preDeregister sample code for javax.management.remote.JMXConnectorServer.preDeregister() definition code for javax.management.remote.JMXConnectorServer.preDeregister()

public void preDeregister()
                   throws Exception sample code for java.lang.Exception definition code for java.lang.Exception 

Called by an MBean server when this connector server is unregistered from that MBean server. If this connector server was attached to that MBean server by being registered in it, and if the connector server is still active, then unregistering it will call the stop sample code for javax.management.remote.JMXConnectorServerMBean.stop() definition code for javax.management.remote.JMXConnectorServerMBean.stop() method. If the stop method throws an exception, the unregistration attempt will fail. It is recommended to call the stop method explicitly before unregistering the MBean.

Specified by:
preDeregister sample code for javax.management.MBeanRegistration.preDeregister() definition code for javax.management.MBeanRegistration.preDeregister() in interface MBeanRegistration sample code for javax.management.MBeanRegistration definition code for javax.management.MBeanRegistration
Throws:
IOException sample code for java.io.IOException definition code for java.io.IOException - if thrown by the stop sample code for javax.management.remote.JMXConnectorServerMBean.stop() definition code for javax.management.remote.JMXConnectorServerMBean.stop() method.
Exception sample code for java.lang.Exception definition code for java.lang.Exception - This exception will be caught by the MBean server and re-thrown as an MBeanRegistrationException sample code for javax.management.MBeanRegistrationException definition code for javax.management.MBeanRegistrationException .

postDeregister sample code for javax.management.remote.JMXConnectorServer.postDeregister() definition code for javax.management.remote.JMXConnectorServer.postDeregister()

public void postDeregister()
Description copied from interface: MBeanRegistration sample code for javax.management.MBeanRegistration.postDeregister() definition code for javax.management.MBeanRegistration.postDeregister()
Allows the MBean to perform any operations needed after having been unregistered in the MBean server.

Specified by:
postDeregister sample code for javax.management.MBeanRegistration.postDeregister() definition code for javax.management.MBeanRegistration.postDeregister() in interface MBeanRegistration sample code for javax.management.MBeanRegistration definition code for javax.management.MBeanRegistration