javax.management.remote.rmi
Class RMIConnectorServer

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 sample code for javax.management.remote.JMXConnectorServer definition code for javax.management.remote.JMXConnectorServer 
          extended by javax.management.remote.rmi.RMIConnectorServer
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

public class RMIConnectorServer
extends JMXConnectorServer sample code for javax.management.remote.JMXConnectorServer definition code for javax.management.remote.JMXConnectorServer

A JMX API connector server that creates RMI-based connections from remote clients. Usually, such connector servers are made using JMXConnectorServerFactory sample code for javax.management.remote.JMXConnectorServerFactory definition code for javax.management.remote.JMXConnectorServerFactory . However, specialized applications can use this class directly, for example with an RMIServerImpl sample code for javax.management.remote.rmi.RMIServerImpl definition code for javax.management.remote.rmi.RMIServerImpl object.

Since:
1.5

Field Summary
static String sample code for java.lang.String definition code for java.lang.String JNDI_REBIND_ATTRIBUTE sample code for javax.management.remote.rmi.RMIConnectorServer.JNDI_REBIND_ATTRIBUTE definition code for javax.management.remote.rmi.RMIConnectorServer.JNDI_REBIND_ATTRIBUTE
          Name of the attribute that specifies whether the RMIServer sample code for javax.management.remote.rmi.RMIServer definition code for javax.management.remote.rmi.RMIServer stub that represents an RMI connector server should override an existing stub at the same address.
static String sample code for java.lang.String definition code for java.lang.String RMI_CLIENT_SOCKET_FACTORY_ATTRIBUTE sample code for javax.management.remote.rmi.RMIConnectorServer.RMI_CLIENT_SOCKET_FACTORY_ATTRIBUTE definition code for javax.management.remote.rmi.RMIConnectorServer.RMI_CLIENT_SOCKET_FACTORY_ATTRIBUTE
          Name of the attribute that specifies the RMIClientSocketFactory sample code for java.rmi.server.RMIClientSocketFactory definition code for java.rmi.server.RMIClientSocketFactory for the RMI objects created in conjunction with this connector.
static String sample code for java.lang.String definition code for java.lang.String RMI_SERVER_SOCKET_FACTORY_ATTRIBUTE sample code for javax.management.remote.rmi.RMIConnectorServer.RMI_SERVER_SOCKET_FACTORY_ATTRIBUTE definition code for javax.management.remote.rmi.RMIConnectorServer.RMI_SERVER_SOCKET_FACTORY_ATTRIBUTE
          Name of the attribute that specifies the RMIServerSocketFactory sample code for java.rmi.server.RMIServerSocketFactory definition code for java.rmi.server.RMIServerSocketFactory for the RMI objects created in conjunction with this connector.
 
Fields inherited from class javax.management.remote.JMXConnectorServer sample code for javax.management.remote.JMXConnectorServer definition code for javax.management.remote.JMXConnectorServer
AUTHENTICATOR sample code for javax.management.remote.JMXConnectorServer.AUTHENTICATOR definition code for javax.management.remote.JMXConnectorServer.AUTHENTICATOR
 
Constructor Summary
RMIConnectorServer sample code for javax.management.remote.rmi.RMIConnectorServer.RMIConnectorServer(javax.management.remote.JMXServiceURL, java.util.Map) definition code for javax.management.remote.rmi.RMIConnectorServer.RMIConnectorServer(javax.management.remote.JMXServiceURL, java.util.Map) (JMXServiceURL sample code for javax.management.remote.JMXServiceURL definition code for javax.management.remote.JMXServiceURL  url, 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 ,?> environment)
          Makes an RMIConnectorServer.
RMIConnectorServer sample code for javax.management.remote.rmi.RMIConnectorServer.RMIConnectorServer(javax.management.remote.JMXServiceURL, java.util.Map, javax.management.MBeanServer) definition code for javax.management.remote.rmi.RMIConnectorServer.RMIConnectorServer(javax.management.remote.JMXServiceURL, java.util.Map, javax.management.MBeanServer) (JMXServiceURL sample code for javax.management.remote.JMXServiceURL definition code for javax.management.remote.JMXServiceURL  url, 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 ,?> environment, MBeanServer sample code for javax.management.MBeanServer definition code for javax.management.MBeanServer  mbeanServer)
          Makes an RMIConnectorServer for the given MBean server.
RMIConnectorServer sample code for javax.management.remote.rmi.RMIConnectorServer.RMIConnectorServer(javax.management.remote.JMXServiceURL, java.util.Map, javax.management.remote.rmi.RMIServerImpl, javax.management.MBeanServer) definition code for javax.management.remote.rmi.RMIConnectorServer.RMIConnectorServer(javax.management.remote.JMXServiceURL, java.util.Map, javax.management.remote.rmi.RMIServerImpl, javax.management.MBeanServer) (JMXServiceURL sample code for javax.management.remote.JMXServiceURL definition code for javax.management.remote.JMXServiceURL  url, 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 ,?> environment, RMIServerImpl sample code for javax.management.remote.rmi.RMIServerImpl definition code for javax.management.remote.rmi.RMIServerImpl  rmiServerImpl, MBeanServer sample code for javax.management.MBeanServer definition code for javax.management.MBeanServer  mbeanServer)
          Makes an RMIConnectorServer for the given MBean server.
 
Method Summary
protected  void connectionClosed sample code for javax.management.remote.rmi.RMIConnectorServer.connectionClosed(java.lang.String, java.lang.String, java.lang.Object) definition code for javax.management.remote.rmi.RMIConnectorServer.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.rmi.RMIConnectorServer.connectionFailed(java.lang.String, java.lang.String, java.lang.Object) definition code for javax.management.remote.rmi.RMIConnectorServer.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.rmi.RMIConnectorServer.connectionOpened(java.lang.String, java.lang.String, java.lang.Object) definition code for javax.management.remote.rmi.RMIConnectorServer.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.
 JMXServiceURL sample code for javax.management.remote.JMXServiceURL definition code for javax.management.remote.JMXServiceURL getAddress sample code for javax.management.remote.rmi.RMIConnectorServer.getAddress() definition code for javax.management.remote.rmi.RMIConnectorServer.getAddress() ()
          The address of this connector server.
 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 ,?> getAttributes sample code for javax.management.remote.rmi.RMIConnectorServer.getAttributes() definition code for javax.management.remote.rmi.RMIConnectorServer.getAttributes() ()
          The attributes for this connector server.
 boolean isActive sample code for javax.management.remote.rmi.RMIConnectorServer.isActive() definition code for javax.management.remote.rmi.RMIConnectorServer.isActive() ()
          Determines whether the connector server is active.
 void start sample code for javax.management.remote.rmi.RMIConnectorServer.start() definition code for javax.management.remote.rmi.RMIConnectorServer.start() ()
          Activates the connector server, that is starts listening for client connections.
 void stop sample code for javax.management.remote.rmi.RMIConnectorServer.stop() definition code for javax.management.remote.rmi.RMIConnectorServer.stop() ()
          Deactivates the connector server, that is, stops listening for client connections.
 JMXConnector sample code for javax.management.remote.JMXConnector definition code for javax.management.remote.JMXConnector toJMXConnector sample code for javax.management.remote.rmi.RMIConnectorServer.toJMXConnector(java.util.Map) definition code for javax.management.remote.rmi.RMIConnectorServer.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.remote.JMXConnectorServer sample code for javax.management.remote.JMXConnectorServer definition code for javax.management.remote.JMXConnectorServer
getConnectionIds sample code for javax.management.remote.JMXConnectorServer.getConnectionIds() definition code for javax.management.remote.JMXConnectorServer.getConnectionIds() , getMBeanServer sample code for javax.management.remote.JMXConnectorServer.getMBeanServer() definition code for javax.management.remote.JMXConnectorServer.getMBeanServer() , getNotificationInfo sample code for javax.management.remote.JMXConnectorServer.getNotificationInfo() definition code for javax.management.remote.JMXConnectorServer.getNotificationInfo() , postDeregister sample code for javax.management.remote.JMXConnectorServer.postDeregister() definition code for javax.management.remote.JMXConnectorServer.postDeregister() , postRegister sample code for javax.management.remote.JMXConnectorServer.postRegister(java.lang.Boolean) definition code for javax.management.remote.JMXConnectorServer.postRegister(java.lang.Boolean) , preDeregister sample code for javax.management.remote.JMXConnectorServer.preDeregister() definition code for javax.management.remote.JMXConnectorServer.preDeregister() , 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) , 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)
 
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)
 

Field Detail

JNDI_REBIND_ATTRIBUTE sample code for javax.management.remote.rmi.RMIConnectorServer.JNDI_REBIND_ATTRIBUTE

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

Name of the attribute that specifies whether the RMIServer sample code for javax.management.remote.rmi.RMIServer definition code for javax.management.remote.rmi.RMIServer stub that represents an RMI connector server should override an existing stub at the same address. The value associated with this attribute, if any, should be a string that is equal, ignoring case, to "true" or "false". The default value is false.

See Also:
Constant Field Values

RMI_CLIENT_SOCKET_FACTORY_ATTRIBUTE sample code for javax.management.remote.rmi.RMIConnectorServer.RMI_CLIENT_SOCKET_FACTORY_ATTRIBUTE

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

Name of the attribute that specifies the RMIClientSocketFactory sample code for java.rmi.server.RMIClientSocketFactory definition code for java.rmi.server.RMIClientSocketFactory for the RMI objects created in conjunction with this connector. The value associated with this attribute must be of type RMIClientSocketFactory and can only be specified in the Map argument supplied when creating a connector server.

See Also:
Constant Field Values

RMI_SERVER_SOCKET_FACTORY_ATTRIBUTE sample code for javax.management.remote.rmi.RMIConnectorServer.RMI_SERVER_SOCKET_FACTORY_ATTRIBUTE

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

Name of the attribute that specifies the RMIServerSocketFactory sample code for java.rmi.server.RMIServerSocketFactory definition code for java.rmi.server.RMIServerSocketFactory for the RMI objects created in conjunction with this connector. The value associated with this attribute must be of type RMIServerSocketFactory and can only be specified in the Map argument supplied when creating a connector server.

See Also:
Constant Field Values
Constructor Detail

RMIConnectorServer sample code for javax.management.remote.rmi.RMIConnectorServer(javax.management.remote.JMXServiceURL, java.util.Map<java.lang.String, ?>) definition code for javax.management.remote.rmi.RMIConnectorServer(javax.management.remote.JMXServiceURL, java.util.Map<java.lang.String, ?>)

public RMIConnectorServer(JMXServiceURL sample code for javax.management.remote.JMXServiceURL definition code for javax.management.remote.JMXServiceURL  url,
                          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 ,?> environment)
                   throws IOException sample code for java.io.IOException definition code for java.io.IOException 

Makes an RMIConnectorServer. This is equivalent to calling RMIConnectorServer(directoryURL,environment,null,null) sample code for javax.management.remote.rmi.RMIConnectorServer.RMIConnectorServer(javax.management.remote.JMXServiceURL, java.util.Map, javax.management.remote.rmi.RMIServerImpl, javax.management.MBeanServer) definition code for javax.management.remote.rmi.RMIConnectorServer.RMIConnectorServer(javax.management.remote.JMXServiceURL, java.util.Map, javax.management.remote.rmi.RMIServerImpl, javax.management.MBeanServer)

Parameters:
url - the URL defining how to create the connector server. Cannot be null.
environment - attributes governing the creation and storing of the RMI object. Can be null, which is equivalent to an empty Map.
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if url is null.
MalformedURLException sample code for java.net.MalformedURLException definition code for java.net.MalformedURLException - if url does not conform to the syntax for an RMI connector, or if its protocol is not recognized by this implementation. Only "rmi" and "jrmp" are valid when this constructor is used.
IOException sample code for java.io.IOException definition code for java.io.IOException - if the connector server cannot be created for some reason or if it is inevitable that its start sample code for javax.management.remote.rmi.RMIConnectorServer.start() definition code for javax.management.remote.rmi.RMIConnectorServer.start() method will fail.

RMIConnectorServer sample code for javax.management.remote.rmi.RMIConnectorServer(javax.management.remote.JMXServiceURL, java.util.Map<java.lang.String, ?>, javax.management.MBeanServer) definition code for javax.management.remote.rmi.RMIConnectorServer(javax.management.remote.JMXServiceURL, java.util.Map<java.lang.String, ?>, javax.management.MBeanServer)

public RMIConnectorServer(JMXServiceURL sample code for javax.management.remote.JMXServiceURL definition code for javax.management.remote.JMXServiceURL  url,
                          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 ,?> environment,
                          MBeanServer sample code for javax.management.MBeanServer definition code for javax.management.MBeanServer  mbeanServer)
                   throws IOException sample code for java.io.IOException definition code for java.io.IOException 

Makes an RMIConnectorServer for the given MBean server. This is equivalent to calling RMIConnectorServer(directoryURL,environment,null,mbeanServer) sample code for javax.management.remote.rmi.RMIConnectorServer.RMIConnectorServer(javax.management.remote.JMXServiceURL, java.util.Map, javax.management.remote.rmi.RMIServerImpl, javax.management.MBeanServer) definition code for javax.management.remote.rmi.RMIConnectorServer.RMIConnectorServer(javax.management.remote.JMXServiceURL, java.util.Map, javax.management.remote.rmi.RMIServerImpl, javax.management.MBeanServer)

Parameters:
url - the URL defining how to create the connector server. Cannot be null.
environment - attributes governing the creation and storing of the RMI object. Can be null, which is equivalent to an empty Map.
mbeanServer - the MBean server to which the new connector server is attached, or null if it will be attached by being registered as an MBean in the MBean server.
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if url is null.
MalformedURLException sample code for java.net.MalformedURLException definition code for java.net.MalformedURLException - if url does not conform to the syntax for an RMI connector, or if its protocol is not recognized by this implementation. Only "rmi" and "jrmp" are valid when this constructor is used.
IOException sample code for java.io.IOException definition code for java.io.IOException - if the connector server cannot be created for some reason or if it is inevitable that its start sample code for javax.management.remote.rmi.RMIConnectorServer.start() definition code for javax.management.remote.rmi.RMIConnectorServer.start() method will fail.

RMIConnectorServer sample code for javax.management.remote.rmi.RMIConnectorServer(javax.management.remote.JMXServiceURL, java.util.Map<java.lang.String, ?>, javax.management.remote.rmi.RMIServerImpl, javax.management.MBeanServer) definition code for javax.management.remote.rmi.RMIConnectorServer(javax.management.remote.JMXServiceURL, java.util.Map<java.lang.String, ?>, javax.management.remote.rmi.RMIServerImpl, javax.management.MBeanServer)

public RMIConnectorServer(JMXServiceURL sample code for javax.management.remote.JMXServiceURL definition code for javax.management.remote.JMXServiceURL  url,
                          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 ,?> environment,
                          RMIServerImpl sample code for javax.management.remote.rmi.RMIServerImpl definition code for javax.management.remote.rmi.RMIServerImpl  rmiServerImpl,
                          MBeanServer sample code for javax.management.MBeanServer definition code for javax.management.MBeanServer  mbeanServer)
                   throws IOException sample code for java.io.IOException definition code for java.io.IOException 

Makes an RMIConnectorServer for the given MBean server.

Parameters:
url - the URL defining how to create the connector server. Cannot be null.
environment - attributes governing the creation and storing of the RMI object. Can be null, which is equivalent to an empty Map.
rmiServerImpl - An implementation of the RMIServer interface, consistent with the protocol type specified in url. If this parameter is non null, the protocol type specified by url is not constrained, and is assumed to be valid. Otherwise, only "rmi" and "iiop" will be recognized.
mbeanServer - the MBean server to which the new connector server is attached, or null if it will be attached by being registered as an MBean in the MBean server.
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if url is null.
MalformedURLException sample code for java.net.MalformedURLException definition code for java.net.MalformedURLException - if url does not conform to the syntax for an RMI connector, or if its protocol is not recognized by this implementation. Only "rmi" and "jrmp" are recognized when rmiServerImpl is null.
IOException sample code for java.io.IOException definition code for java.io.IOException - if the connector server cannot be created for some reason or if it is inevitable that its start sample code for javax.management.remote.rmi.RMIConnectorServer.start() definition code for javax.management.remote.rmi.RMIConnectorServer.start() method will fail.
See Also:
start() sample code for javax.management.remote.rmi.RMIConnectorServer.start() definition code for javax.management.remote.rmi.RMIConnectorServer.start()
Method Detail

toJMXConnector sample code for javax.management.remote.rmi.RMIConnectorServer.toJMXConnector(java.util.Map<java.lang.String, ?>) definition code for javax.management.remote.rmi.RMIConnectorServer.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.

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
Overrides:
toJMXConnector sample code for javax.management.remote.JMXConnectorServer.toJMXConnector(java.util.Map) definition code for javax.management.remote.JMXConnectorServer.toJMXConnector(java.util.Map) in class JMXConnectorServer sample code for javax.management.remote.JMXConnectorServer definition code for javax.management.remote.JMXConnectorServer
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 isActive() sample code for javax.management.remote.rmi.RMIConnectorServer.isActive() definition code for javax.management.remote.rmi.RMIConnectorServer.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.

start sample code for javax.management.remote.rmi.RMIConnectorServer.start() definition code for javax.management.remote.rmi.RMIConnectorServer.start()

public void start()
           throws IOException sample code for java.io.IOException definition code for java.io.IOException 

Activates the connector server, that is starts listening for client connections. Calling this method when the connector server is already active has no effect. Calling this method when the connector server has been stopped will generate an IOException.

The behaviour of this method when called for the first time depends on the parameters that were supplied at construction, as described below.

First, an object of a subclass of RMIServerImpl sample code for javax.management.remote.rmi.RMIServerImpl definition code for javax.management.remote.rmi.RMIServerImpl is required, to export the connector server through RMI:

If the given address includes a JNDI directory URL as specified in the package documentation for javax.management.remote.rmi, then this RMIConnectorServer will bootstrap by binding the RMIServerImpl to the given address.

If the URL path part of the JMXServiceURL was empty or a single slash (/), then the RMI object will not be bound to a directory. Instead, a reference to it will be encoded in the URL path of the RMIConnectorServer address (returned by getAddress() sample code for javax.management.remote.rmi.RMIConnectorServer.getAddress() definition code for javax.management.remote.rmi.RMIConnectorServer.getAddress() ). The encodings for rmi and iiop are described in the package documentation for javax.management.remote.rmi.

The behavior when the URL path is neither empty nor a JNDI directory URL, or when the protocol is neither rmi nor iiop, is implementation defined, and may include throwing MalformedURLException sample code for java.net.MalformedURLException definition code for java.net.MalformedURLException when the connector server is created or when it is started.

Throws:
IllegalStateException sample code for java.lang.IllegalStateException definition code for java.lang.IllegalStateException - if the connector server has not been attached to an MBean server.
IOException sample code for java.io.IOException definition code for java.io.IOException - if the connector server cannot be started.

stop sample code for javax.management.remote.rmi.RMIConnectorServer.stop() definition code for javax.management.remote.rmi.RMIConnectorServer.stop()

public void stop()
          throws IOException sample code for java.io.IOException definition code for java.io.IOException 

Deactivates the connector server, that is, stops listening for client connections. Calling this method will also close all client connections that were made by this server. After this method returns, whether normally or with an exception, the connector server will not create any new client connections.

Once a connector server has been stopped, it cannot be started again.

Calling this method when the connector server has already been stopped has no effect. Calling this method when the connector server has not yet been started will disable the connector server object permanently.

If closing a client connection produces an exception, that exception is not thrown from this method. A JMXConnectionNotification sample code for javax.management.remote.JMXConnectionNotification definition code for javax.management.remote.JMXConnectionNotification is emitted from this MBean with the connection ID of the connection that could not be closed.

Closing a connector server is a potentially slow operation. For example, if a client machine with an open connection has crashed, the close operation might have to wait for a network protocol timeout. Callers that do not want to block in a close operation should do it in a separate thread.

This method calls the method close sample code for javax.management.remote.rmi.RMIServerImpl.close() definition code for javax.management.remote.rmi.RMIServerImpl.close() on the connector server's RMIServerImpl object.

If the RMIServerImpl was bound to a JNDI directory by the start sample code for javax.management.remote.rmi.RMIConnectorServer.start() definition code for javax.management.remote.rmi.RMIConnectorServer.start() method, it is unbound from the directory by this method.

Throws:
IOException sample code for java.io.IOException definition code for java.io.IOException - if the server cannot be closed cleanly, or if the RMIServerImpl cannot be unbound from the directory. When this exception is thrown, the server has already attempted to close all client connections, if appropriate; to call RMIServerImpl.close() sample code for javax.management.remote.rmi.RMIServerImpl.close() definition code for javax.management.remote.rmi.RMIServerImpl.close() ; and to unbind the RMIServerImpl from its directory, if appropriate. All client connections are closed except possibly those that generated exceptions when the server attempted to close them.

isActive sample code for javax.management.remote.rmi.RMIConnectorServer.isActive() definition code for javax.management.remote.rmi.RMIConnectorServer.isActive()

public boolean isActive()
Description copied from interface: JMXConnectorServerMBean sample code for javax.management.remote.JMXConnectorServerMBean.isActive() definition code for javax.management.remote.JMXConnectorServerMBean.isActive()

Determines whether the connector server is active. A connector server starts being active when its start sample code for javax.management.remote.JMXConnectorServerMBean.start() definition code for javax.management.remote.JMXConnectorServerMBean.start() method returns successfully and remains active until either its stop sample code for javax.management.remote.JMXConnectorServerMBean.stop() definition code for javax.management.remote.JMXConnectorServerMBean.stop() method is called or the connector server fails.

Returns:
true if the connector server is active.

getAddress sample code for javax.management.remote.rmi.RMIConnectorServer.getAddress() definition code for javax.management.remote.rmi.RMIConnectorServer.getAddress()

public JMXServiceURL sample code for javax.management.remote.JMXServiceURL definition code for javax.management.remote.JMXServiceURL  getAddress()
Description copied from interface: JMXConnectorServerMBean sample code for javax.management.remote.JMXConnectorServerMBean.getAddress() definition code for javax.management.remote.JMXConnectorServerMBean.getAddress()

The address of this connector server.

Returns:
the address of this connector server, or null if it does not have one.

getAttributes sample code for javax.management.remote.rmi.RMIConnectorServer.getAttributes() definition code for javax.management.remote.rmi.RMIConnectorServer.getAttributes()

public 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 ,?> getAttributes()
Description copied from interface: JMXConnectorServerMBean sample code for javax.management.remote.JMXConnectorServerMBean.getAttributes() definition code for javax.management.remote.JMXConnectorServerMBean.getAttributes()

The attributes for this connector server.

Returns:
a read-only map containing the attributes for this connector server. Attributes whose values are not serializable are omitted from this map. If there are no serializable attributes, the returned map is empty.

connectionOpened sample code for javax.management.remote.rmi.RMIConnectorServer.connectionOpened(java.lang.String, java.lang.String, java.lang.Object) definition code for javax.management.remote.rmi.RMIConnectorServer.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)
Description copied from class: JMXConnectorServer 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)

Called by a subclass when a new client connection is opened. Adds connectionId to the list returned by JMXConnectorServer.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 .

Overrides:
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) in class JMXConnectorServer sample code for javax.management.remote.JMXConnectorServer definition code for javax.management.remote.JMXConnectorServer
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() .

connectionClosed sample code for javax.management.remote.rmi.RMIConnectorServer.connectionClosed(java.lang.String, java.lang.String, java.lang.Object) definition code for javax.management.remote.rmi.RMIConnectorServer.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)
Description copied from class: JMXConnectorServer 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)

Called by a subclass when a client connection is closed normally. Removes connectionId from the list returned by JMXConnectorServer.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 .

Overrides:
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) in class JMXConnectorServer sample code for javax.management.remote.JMXConnectorServer definition code for javax.management.remote.JMXConnectorServer
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() .

connectionFailed sample code for javax.management.remote.rmi.RMIConnectorServer.connectionFailed(java.lang.String, java.lang.String, java.lang.Object) definition code for javax.management.remote.rmi.RMIConnectorServer.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)
Description copied from class: JMXConnectorServer 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)

Called by a subclass when a client connection fails. Removes connectionId from the list returned by JMXConnectorServer.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 .

Overrides:
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) in class JMXConnectorServer sample code for javax.management.remote.JMXConnectorServer definition code for javax.management.remote.JMXConnectorServer
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() .