javax.management.remote.rmi
Class RMIConnector

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.management.remote.rmi.RMIConnector
All Implemented Interfaces:
Serializable sample code for java.io.Serializable definition code for java.io.Serializable , JMXConnector sample code for javax.management.remote.JMXConnector definition code for javax.management.remote.JMXConnector

public class RMIConnector
extends Object sample code for java.lang.Object definition code for java.lang.Object
implements JMXConnector sample code for javax.management.remote.JMXConnector definition code for javax.management.remote.JMXConnector , Serializable sample code for java.io.Serializable definition code for java.io.Serializable

A connection to a remote RMI connector. Usually, such connections are made using JMXConnectorFactory sample code for javax.management.remote.JMXConnectorFactory definition code for javax.management.remote.JMXConnectorFactory . However, specialized applications can use this class directly, for example with an RMIServer sample code for javax.management.remote.rmi.RMIServer definition code for javax.management.remote.rmi.RMIServer stub obtained without going through JNDI.

Since:
1.5
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface javax.management.remote.JMXConnector sample code for javax.management.remote.JMXConnector definition code for javax.management.remote.JMXConnector
CREDENTIALS sample code for javax.management.remote.JMXConnector.CREDENTIALS definition code for javax.management.remote.JMXConnector.CREDENTIALS
 
Constructor Summary
RMIConnector sample code for javax.management.remote.rmi.RMIConnector.RMIConnector(javax.management.remote.JMXServiceURL, java.util.Map) definition code for javax.management.remote.rmi.RMIConnector.RMIConnector(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)
          Constructs an RMIConnector that will connect the RMI connector server with the given address.
RMIConnector sample code for javax.management.remote.rmi.RMIConnector.RMIConnector(javax.management.remote.rmi.RMIServer, java.util.Map) definition code for javax.management.remote.rmi.RMIConnector.RMIConnector(javax.management.remote.rmi.RMIServer, java.util.Map) (RMIServer sample code for javax.management.remote.rmi.RMIServer definition code for javax.management.remote.rmi.RMIServer  rmiServer, 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)
          Constructs an RMIConnector using the given RMI stub.
 
Method Summary
 void addConnectionNotificationListener sample code for javax.management.remote.rmi.RMIConnector.addConnectionNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) definition code for javax.management.remote.rmi.RMIConnector.addConnectionNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) (NotificationListener sample code for javax.management.NotificationListener definition code for javax.management.NotificationListener  listener, NotificationFilter sample code for javax.management.NotificationFilter definition code for javax.management.NotificationFilter  filter, Object sample code for java.lang.Object definition code for java.lang.Object  handback)
          Adds a listener to be informed of changes in connection status.
 void close sample code for javax.management.remote.rmi.RMIConnector.close() definition code for javax.management.remote.rmi.RMIConnector.close() ()
          Closes the client connection to its server.
 void connect sample code for javax.management.remote.rmi.RMIConnector.connect() definition code for javax.management.remote.rmi.RMIConnector.connect() ()
          Establishes the connection to the connector server.
 void connect sample code for javax.management.remote.rmi.RMIConnector.connect(java.util.Map) definition code for javax.management.remote.rmi.RMIConnector.connect(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 ,?> environment)
          Establishes the connection to the connector server.
 String sample code for java.lang.String definition code for java.lang.String getConnectionId sample code for javax.management.remote.rmi.RMIConnector.getConnectionId() definition code for javax.management.remote.rmi.RMIConnector.getConnectionId() ()
          Gets this connection's ID from the connector server.
 MBeanServerConnection sample code for javax.management.MBeanServerConnection definition code for javax.management.MBeanServerConnection getMBeanServerConnection sample code for javax.management.remote.rmi.RMIConnector.getMBeanServerConnection() definition code for javax.management.remote.rmi.RMIConnector.getMBeanServerConnection() ()
          Returns an MBeanServerConnection object representing a remote MBean server.
 MBeanServerConnection sample code for javax.management.MBeanServerConnection definition code for javax.management.MBeanServerConnection getMBeanServerConnection sample code for javax.management.remote.rmi.RMIConnector.getMBeanServerConnection(javax.security.auth.Subject) definition code for javax.management.remote.rmi.RMIConnector.getMBeanServerConnection(javax.security.auth.Subject) (Subject sample code for javax.security.auth.Subject definition code for javax.security.auth.Subject  delegationSubject)
          Returns an MBeanServerConnection object representing a remote MBean server on which operations are performed on behalf of the supplied delegation subject.
 void removeConnectionNotificationListener sample code for javax.management.remote.rmi.RMIConnector.removeConnectionNotificationListener(javax.management.NotificationListener) definition code for javax.management.remote.rmi.RMIConnector.removeConnectionNotificationListener(javax.management.NotificationListener) (NotificationListener sample code for javax.management.NotificationListener definition code for javax.management.NotificationListener  listener)
          Removes a listener from the list to be informed of changes in status.
 void removeConnectionNotificationListener sample code for javax.management.remote.rmi.RMIConnector.removeConnectionNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) definition code for javax.management.remote.rmi.RMIConnector.removeConnectionNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) (NotificationListener sample code for javax.management.NotificationListener definition code for javax.management.NotificationListener  listener, NotificationFilter sample code for javax.management.NotificationFilter definition code for javax.management.NotificationFilter  filter, Object sample code for java.lang.Object definition code for java.lang.Object  handback)
          Removes a listener from the list to be informed of changes in status.
 String sample code for java.lang.String definition code for java.lang.String toString sample code for javax.management.remote.rmi.RMIConnector.toString() definition code for javax.management.remote.rmi.RMIConnector.toString() ()
          Returns a string representation of this object.
 
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() , 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)
 

Constructor Detail

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

public RMIConnector(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)

Constructs an RMIConnector that will connect the RMI connector server with the given address.

The address can refer directly to the connector server, using one of the following syntaxes:

 service:jmx:rmi://[host[:port]]/stub/encoded-stub
 service:jmx:iiop://[host[:port]]/ior/encoded-IOR
 

(Here, the square brackets [] are not part of the address but indicate that the host and port are optional.)

The address can instead indicate where to find an RMI stub through JNDI, using one of the following syntaxes:

 service:jmx:rmi://[host[:port]]/jndi/jndi-name
 service:jmx:iiop://[host[:port]]/jndi/jndi-name
 

An implementation may also recognize additional address syntaxes, for example:

 service:jmx:iiop://[host[:port]]/stub/encoded-stub
 

Parameters:
url - the address of the RMI connector server.
environment - additional attributes specifying how to make the connection. For JNDI-based addresses, these attributes can usefully include JNDI attributes recognized by InitialContext sample code for javax.naming.InitialContext.InitialContext(java.util.Hashtable) definition code for javax.naming.InitialContext.InitialContext(java.util.Hashtable) . This parameter 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.

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

public RMIConnector(RMIServer sample code for javax.management.remote.rmi.RMIServer definition code for javax.management.remote.rmi.RMIServer  rmiServer,
                    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)

Constructs an RMIConnector using the given RMI stub.

Parameters:
rmiServer - an RMI stub representing the RMI connector server.
environment - additional attributes specifying how to make the connection. This parameter 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 rmiServer is null.
Method Detail

toString sample code for javax.management.remote.rmi.RMIConnector.toString() definition code for javax.management.remote.rmi.RMIConnector.toString()

public String sample code for java.lang.String definition code for java.lang.String  toString()

Returns a string representation of this object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read.

Overrides:
toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() in class Object sample code for java.lang.Object definition code for java.lang.Object
Returns:
a String representation of this object.

connect sample code for javax.management.remote.rmi.RMIConnector.connect() definition code for javax.management.remote.rmi.RMIConnector.connect()

public void connect()
             throws IOException sample code for java.io.IOException definition code for java.io.IOException 
Description copied from interface: JMXConnector sample code for javax.management.remote.JMXConnector.connect() definition code for javax.management.remote.JMXConnector.connect()

Establishes the connection to the connector server. This method is equivalent to connect(null) sample code for javax.management.remote.JMXConnector.connect(java.util.Map) definition code for javax.management.remote.JMXConnector.connect(java.util.Map) .

Specified by:
connect sample code for javax.management.remote.JMXConnector.connect() definition code for javax.management.remote.JMXConnector.connect() in interface JMXConnector sample code for javax.management.remote.JMXConnector definition code for javax.management.remote.JMXConnector
Throws:
IOException sample code for java.io.IOException definition code for java.io.IOException - if the connection could not be made because of a communication problem.

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

public void connect(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 
Description copied from interface: JMXConnector sample code for javax.management.remote.JMXConnector.connect(java.util.Map) definition code for javax.management.remote.JMXConnector.connect(java.util.Map)

Establishes the connection to the connector server.

If connect has already been called successfully on this object, calling it again has no effect. If, however, JMXConnector.close() sample code for javax.management.remote.JMXConnector.close() definition code for javax.management.remote.JMXConnector.close() was called after connect, the new connect will throw an IOException.

Otherwise, either connect has never been called on this object, or it has been called but produced an exception. Then calling connect will attempt to establish a connection to the connector server.

Specified by:
connect sample code for javax.management.remote.JMXConnector.connect(java.util.Map) definition code for javax.management.remote.JMXConnector.connect(java.util.Map) in interface JMXConnector sample code for javax.management.remote.JMXConnector definition code for javax.management.remote.JMXConnector
Parameters:
environment - the properties of the connection. Properties in this map override properties in the map specified when the JMXConnector was created, if any. This parameter can be null, which is equivalent to an empty map.
Throws:
IOException sample code for java.io.IOException definition code for java.io.IOException - if the connection could not be made because of a communication problem.

getConnectionId sample code for javax.management.remote.rmi.RMIConnector.getConnectionId() definition code for javax.management.remote.rmi.RMIConnector.getConnectionId()

public String sample code for java.lang.String definition code for java.lang.String  getConnectionId()
                       throws IOException sample code for java.io.IOException definition code for java.io.IOException 
Description copied from interface: JMXConnector sample code for javax.management.remote.JMXConnector.getConnectionId() definition code for javax.management.remote.JMXConnector.getConnectionId()

Gets this connection's ID from the connector server. For a given connector server, every connection will have a unique id which does not change during the lifetime of the connection.

Specified by:
getConnectionId sample code for javax.management.remote.JMXConnector.getConnectionId() definition code for javax.management.remote.JMXConnector.getConnectionId() in interface JMXConnector sample code for javax.management.remote.JMXConnector definition code for javax.management.remote.JMXConnector
Returns:
the unique ID of this connection. This is the same as the ID that the connector server includes in its JMXConnectionNotification sample code for javax.management.remote.JMXConnectionNotification definition code for javax.management.remote.JMXConnectionNotification s. The package description describes the conventions for connection IDs.
Throws:
IOException sample code for java.io.IOException definition code for java.io.IOException - if the connection ID cannot be obtained, for instance because the connection is closed or broken.

getMBeanServerConnection sample code for javax.management.remote.rmi.RMIConnector.getMBeanServerConnection() definition code for javax.management.remote.rmi.RMIConnector.getMBeanServerConnection()

public MBeanServerConnection sample code for javax.management.MBeanServerConnection definition code for javax.management.MBeanServerConnection  getMBeanServerConnection()
                                               throws IOException sample code for java.io.IOException definition code for java.io.IOException 
Description copied from interface: JMXConnector sample code for javax.management.remote.JMXConnector.getMBeanServerConnection() definition code for javax.management.remote.JMXConnector.getMBeanServerConnection()

Returns an MBeanServerConnection object representing a remote MBean server. For a given JMXConnector, two successful calls to this method will usually return the same MBeanServerConnection object, though this is not required.

For each method in the returned MBeanServerConnection, calling the method causes the corresponding method to be called in the remote MBean server. The value returned by the MBean server method is the value returned to the client. If the MBean server method produces an Exception, the same Exception is seen by the client. If the MBean server method, or the attempt to call it, produces an Error, the Error is wrapped in a JMXServerErrorException sample code for javax.management.remote.JMXServerErrorException definition code for javax.management.remote.JMXServerErrorException , which is seen by the client.

Calling this method is equivalent to calling getMBeanServerConnection(null) sample code for javax.management.remote.JMXConnector.getMBeanServerConnection(javax.security.auth.Subject) definition code for javax.management.remote.JMXConnector.getMBeanServerConnection(javax.security.auth.Subject) meaning that no delegation subject is specified and that all the operations called on the MBeanServerConnection must use the authenticated subject, if any.

Specified by:
getMBeanServerConnection sample code for javax.management.remote.JMXConnector.getMBeanServerConnection() definition code for javax.management.remote.JMXConnector.getMBeanServerConnection() in interface JMXConnector sample code for javax.management.remote.JMXConnector definition code for javax.management.remote.JMXConnector
Returns:
an object that implements the MBeanServerConnection interface by forwarding its methods to the remote MBean server.
Throws:
IOException sample code for java.io.IOException definition code for java.io.IOException - if a valid MBeanServerConnection cannot be created, for instance because the connection to the remote MBean server has not yet been established (with the connect sample code for javax.management.remote.JMXConnector.connect(java.util.Map) definition code for javax.management.remote.JMXConnector.connect(java.util.Map) method), or it has been closed, or it has broken.

getMBeanServerConnection sample code for javax.management.remote.rmi.RMIConnector.getMBeanServerConnection(javax.security.auth.Subject) definition code for javax.management.remote.rmi.RMIConnector.getMBeanServerConnection(javax.security.auth.Subject)

public MBeanServerConnection sample code for javax.management.MBeanServerConnection definition code for javax.management.MBeanServerConnection  getMBeanServerConnection(Subject sample code for javax.security.auth.Subject definition code for javax.security.auth.Subject  delegationSubject)
                                               throws IOException sample code for java.io.IOException definition code for java.io.IOException 
Description copied from interface: JMXConnector sample code for javax.management.remote.JMXConnector.getMBeanServerConnection(javax.security.auth.Subject) definition code for javax.management.remote.JMXConnector.getMBeanServerConnection(javax.security.auth.Subject)

Returns an MBeanServerConnection object representing a remote MBean server on which operations are performed on behalf of the supplied delegation subject. For a given JMXConnector and Subject, two successful calls to this method will usually return the same MBeanServerConnection object, though this is not required.

For each method in the returned MBeanServerConnection, calling the method causes the corresponding method to be called in the remote MBean server on behalf of the given delegation subject instead of the authenticated subject. The value returned by the MBean server method is the value returned to the client. If the MBean server method produces an Exception, the same Exception is seen by the client. If the MBean server method, or the attempt to call it, produces an Error, the Error is wrapped in a JMXServerErrorException sample code for javax.management.remote.JMXServerErrorException definition code for javax.management.remote.JMXServerErrorException , which is seen by the client.

Specified by:
getMBeanServerConnection sample code for javax.management.remote.JMXConnector.getMBeanServerConnection(javax.security.auth.Subject) definition code for javax.management.remote.JMXConnector.getMBeanServerConnection(javax.security.auth.Subject) in interface JMXConnector sample code for javax.management.remote.JMXConnector definition code for javax.management.remote.JMXConnector
Parameters:
delegationSubject - the Subject on behalf of which requests will be performed. Can be null, in which case requests will be performed on behalf of the authenticated Subject, if any.
Returns:
an object that implements the MBeanServerConnection interface by forwarding its methods to the remote MBean server on behalf of a given delegation subject.
Throws:
IOException sample code for java.io.IOException definition code for java.io.IOException - if a valid MBeanServerConnection cannot be created, for instance because the connection to the remote MBean server has not yet been established (with the connect sample code for javax.management.remote.JMXConnector.connect(java.util.Map) definition code for javax.management.remote.JMXConnector.connect(java.util.Map) method), or it has been closed, or it has broken.

addConnectionNotificationListener sample code for javax.management.remote.rmi.RMIConnector.addConnectionNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) definition code for javax.management.remote.rmi.RMIConnector.addConnectionNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)

public void addConnectionNotificationListener(NotificationListener sample code for javax.management.NotificationListener definition code for javax.management.NotificationListener  listener,
                                              NotificationFilter sample code for javax.management.NotificationFilter definition code for javax.management.NotificationFilter  filter,
                                              Object sample code for java.lang.Object definition code for java.lang.Object  handback)
Description copied from interface: JMXConnector sample code for javax.management.remote.JMXConnector.addConnectionNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) definition code for javax.management.remote.JMXConnector.addConnectionNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)

Adds a listener to be informed of changes in connection status. The listener will receive notifications of type JMXConnectionNotification sample code for javax.management.remote.JMXConnectionNotification definition code for javax.management.remote.JMXConnectionNotification . An implementation can send other types of notifications too.

Any number of listeners can be added with this method. The same listener can be added more than once with the same or different values for the filter and handback. There is no special treatment of a duplicate entry. For example, if a listener is registered twice with no filter, then its handleNotification method will be called twice for each notification.

Specified by:
addConnectionNotificationListener sample code for javax.management.remote.JMXConnector.addConnectionNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) definition code for javax.management.remote.JMXConnector.addConnectionNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) in interface JMXConnector sample code for javax.management.remote.JMXConnector definition code for javax.management.remote.JMXConnector
Parameters:
listener - a listener to receive connection status notifications.
filter - a filter to select which notifications are to be delivered to the listener, or null if all notifications are to be delivered.
handback - an object to be given to the listener along with each notification. Can be null.
See Also:
JMXConnector.removeConnectionNotificationListener(javax.management.NotificationListener) sample code for javax.management.remote.JMXConnector.removeConnectionNotificationListener(javax.management.NotificationListener) definition code for javax.management.remote.JMXConnector.removeConnectionNotificationListener(javax.management.NotificationListener) , NotificationBroadcaster.addNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) sample code for javax.management.NotificationBroadcaster.addNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) definition code for javax.management.NotificationBroadcaster.addNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)

removeConnectionNotificationListener sample code for javax.management.remote.rmi.RMIConnector.removeConnectionNotificationListener(javax.management.NotificationListener) definition code for javax.management.remote.rmi.RMIConnector.removeConnectionNotificationListener(javax.management.NotificationListener)

public void removeConnectionNotificationListener(NotificationListener sample code for javax.management.NotificationListener definition code for javax.management.NotificationListener  listener)
                                          throws ListenerNotFoundException sample code for javax.management.ListenerNotFoundException definition code for javax.management.ListenerNotFoundException 
Description copied from interface: JMXConnector sample code for javax.management.remote.JMXConnector.removeConnectionNotificationListener(javax.management.NotificationListener) definition code for javax.management.remote.JMXConnector.removeConnectionNotificationListener(javax.management.NotificationListener)

Removes a listener from the list to be informed of changes in status. The listener must previously have been added. If there is more than one matching listener, all are removed.

Specified by:
removeConnectionNotificationListener sample code for javax.management.remote.JMXConnector.removeConnectionNotificationListener(javax.management.NotificationListener) definition code for javax.management.remote.JMXConnector.removeConnectionNotificationListener(javax.management.NotificationListener) in interface JMXConnector sample code for javax.management.remote.JMXConnector definition code for javax.management.remote.JMXConnector
Parameters:
listener - a listener to receive connection status notifications.
Throws:
ListenerNotFoundException sample code for javax.management.ListenerNotFoundException definition code for javax.management.ListenerNotFoundException - if the listener is not registered with this JMXConnector.
See Also:
JMXConnector.removeConnectionNotificationListener(NotificationListener, NotificationFilter, Object) sample code for javax.management.remote.JMXConnector.removeConnectionNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) definition code for javax.management.remote.JMXConnector.removeConnectionNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) , JMXConnector.addConnectionNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) sample code for javax.management.remote.JMXConnector.addConnectionNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) definition code for javax.management.remote.JMXConnector.addConnectionNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) , NotificationEmitter.removeNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) sample code for javax.management.NotificationEmitter.removeNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) definition code for javax.management.NotificationEmitter.removeNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)

removeConnectionNotificationListener sample code for javax.management.remote.rmi.RMIConnector.removeConnectionNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) definition code for javax.management.remote.rmi.RMIConnector.removeConnectionNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)

public void removeConnectionNotificationListener(NotificationListener sample code for javax.management.NotificationListener definition code for javax.management.NotificationListener  listener,
                                                 NotificationFilter sample code for javax.management.NotificationFilter definition code for javax.management.NotificationFilter  filter,
                                                 Object sample code for java.lang.Object definition code for java.lang.Object  handback)
                                          throws ListenerNotFoundException sample code for javax.management.ListenerNotFoundException definition code for javax.management.ListenerNotFoundException 
Description copied from interface: JMXConnector sample code for javax.management.remote.JMXConnector.removeConnectionNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) definition code for javax.management.remote.JMXConnector.removeConnectionNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)

Removes a listener from the list to be informed of changes in status. The listener must previously have been added with the same three parameters. If there is more than one matching listener, only one is removed.

Specified by:
removeConnectionNotificationListener sample code for javax.management.remote.JMXConnector.removeConnectionNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) definition code for javax.management.remote.JMXConnector.removeConnectionNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) in interface JMXConnector sample code for javax.management.remote.JMXConnector definition code for javax.management.remote.JMXConnector
Parameters:
listener - a listener to receive connection status notifications.
filter - a filter to select which notifications are to be delivered to the listener. Can be null.
handback - an object to be given to the listener along with each notification. Can be null.
Throws:
ListenerNotFoundException sample code for javax.management.ListenerNotFoundException definition code for javax.management.ListenerNotFoundException - if the listener is not registered with this JMXConnector, or is not registered with the given filter and handback.
See Also:
JMXConnector.removeConnectionNotificationListener(NotificationListener) sample code for javax.management.remote.JMXConnector.removeConnectionNotificationListener(javax.management.NotificationListener) definition code for javax.management.remote.JMXConnector.removeConnectionNotificationListener(javax.management.NotificationListener) , JMXConnector.addConnectionNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) sample code for javax.management.remote.JMXConnector.addConnectionNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) definition code for javax.management.remote.JMXConnector.addConnectionNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) , NotificationEmitter.removeNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) sample code for javax.management.NotificationEmitter.removeNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) definition code for javax.management.NotificationEmitter.removeNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)

close sample code for javax.management.remote.rmi.RMIConnector.close() definition code for javax.management.remote.rmi.RMIConnector.close()

public void close()
           throws IOException sample code for java.io.IOException definition code for java.io.IOException 
Description copied from interface: JMXConnector sample code for javax.management.remote.JMXConnector.close() definition code for javax.management.remote.JMXConnector.close()

Closes the client connection to its server. Any ongoing or new request using the MBeanServerConnection returned by JMXConnector.getMBeanServerConnection() sample code for javax.management.remote.JMXConnector.getMBeanServerConnection() definition code for javax.management.remote.JMXConnector.getMBeanServerConnection() will get an IOException.

If close has already been called successfully on this object, calling it again has no effect. If close has never been called, or if it was called but produced an exception, an attempt will be made to close the connection. This attempt can succeed, in which case close will return normally, or it can generate an exception.

Closing a connection is a potentially slow operation. For example, if the server 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.

Specified by:
close sample code for javax.management.remote.JMXConnector.close() definition code for javax.management.remote.JMXConnector.close() in interface JMXConnector sample code for javax.management.remote.JMXConnector definition code for javax.management.remote.JMXConnector
Throws:
IOException sample code for java.io.IOException definition code for java.io.IOException - if the connection cannot be closed cleanly. If this exception is thrown, it is not known whether the server end of the connection has been cleanly closed.