The client end of a JMX API connector. An object of this type can be used to establish a connection to a connector server.
A newly-created object of this type is unconnected. Its connect
method must be called before it can be used.
However, objects created by JMXConnectorFactory.
are already connected.
Modifier and Type | Field and Description |
---|---|
public static final String | CREDENTIALS
Name of the attribute that specifies the credentials to send to the connector server during connection. |
Modifier and Type | Method and Description |
---|---|
public void | addConnectionNotificationListener(NotificationListener
a listener to receive connection status
notifications. listener, NotificationFilter a filter to select which notifications are to be
delivered to the listener, or null if all notifications are to
be delivered. filter, Object an object to be given to the listener along
with each notification. Can be null. handback)Adds a listener to be informed of changes in connection status. |
public void | |
public void | |
public void | |
public String | Returns: the unique ID of this connection. This is the same as the ID that the connector server includes in itsJMXConnectionNotification s. The package description describes the
conventions for connection IDs.Gets this connection's ID from the connector server. |
public MBeanServerConnection | Returns: an object that implements theMBeanServerConnection interface by forwarding its
methods to the remote MBean server.Returns an |
public default MBeanServerConnection | Returns: an object that implements theMBeanServerConnection
interface by forwarding its methods to the remote MBean server.must be delegationSubject)null .
Deprecated
for removal since 21. This method supported the legacy Subject Delegation feature,
which has been removed. There is no replacement.
When |
public void | removeConnectionNotificationListener(NotificationListener
a listener to receive connection status
notifications. listener)Removes a listener from the list to be informed of changes in status. |
public void | removeConnectionNotificationListener(NotificationListener
a listener to receive connection status notifications. l, NotificationFilter a filter to select which notifications are to be
delivered to the listener. Can be null. f, Object an object to be given to the listener along
with each notification. Can be null. handback)Removes a listener from the list to be informed of changes in status. |
CREDENTIALS | back to summary |
---|---|
public static final String CREDENTIALS Name of the attribute that specifies the credentials to send
to the connector server during connection. The value
associated with this attribute, if any, is a serializable
object of an appropriate type for the server's |
addConnectionNotificationListener | back to summary |
---|---|
public void addConnectionNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) Adds a listener to be informed of changes in connection
status. The listener will receive notifications of type 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
|
close | back to summary |
---|---|
public void close() throws IOException Redeclares java. Closes the client connection to its server. Any ongoing or new
request using the MBeanServerConnection returned by If 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.
|
connect | back to summary |
---|---|
public void connect() throws IOException Establishes the connection to the connector server. This
method is equivalent to
|
connect | back to summary |
---|---|
public void connect(Map<String, ?> env) throws IOException Establishes the connection to the connector server. If Otherwise, either
|
getConnectionId | back to summary |
---|---|
public String getConnectionId() throws IOException 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.
|
getMBeanServerConnection | back to summary |
---|---|
public MBeanServerConnection getMBeanServerConnection() throws IOException Returns an For each method in the returned
|
getMBeanServerConnection | back to summary |
---|---|
public default MBeanServerConnection getMBeanServerConnection(Subject delegationSubject) throws IOException
Deprecated for removal since 21. This method supported the legacy Subject Delegation feature, which has been removed. There is no replacement. When Implementation Specification The default implementation of this method throws
|
removeConnectionNotificationListener | back to summary |
---|---|
public void removeConnectionNotificationListener(NotificationListener listener) throws ListenerNotFoundException 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.
|
removeConnectionNotificationListener | back to summary |
---|---|
public void removeConnectionNotificationListener(NotificationListener l, NotificationFilter f, Object handback) throws ListenerNotFoundException 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.
|