| javax.management.Notification javax.management.remote.JMXConnectionNotification
JMXConnectionNotification | public class JMXConnectionNotification extends Notification (Code) | | Notification emitted when a client connection is opened or
closed or when notifications are lost. These notifications are
sent by connector servers (instances of
JMXConnectorServer )
and by connector clients (instances of
JMXConnector ). For
certain connectors, a session can consist of a sequence of
connections. Connection-opened and connection-closed notifications
will be sent for each one.
The notification type is one of the following:
Type |
Meaning |
jmx.remote.connection.opened |
A new client connection has been opened. |
jmx.remote.connection.closed |
A client connection has been closed. |
jmx.remote.connection.failed |
A client connection has failed unexpectedly. |
jmx.remote.connection.notifs.lost |
A client connection has potentially lost notifications. This
notification only appears on the client side. |
The timeStamp of the notification is a time value
(consistent with
System.currentTimeMillis ) indicating
when the notification was constructed.
since: 1.5 |
Field Summary | |
final public static String | CLOSED Notification type string for a connection-closed notification. | final public static String | FAILED Notification type string for a connection-failed notification. | final public static String | NOTIFS_LOST | final public static String | OPENED Notification type string for a connection-opened notification. |
CLOSED | final public static String CLOSED(Code) | | Notification type string for a connection-closed notification.
|
FAILED | final public static String FAILED(Code) | | Notification type string for a connection-failed notification.
|
NOTIFS_LOST | final public static String NOTIFS_LOST(Code) | | Notification type string for a connection that has possibly
lost notifications.
|
OPENED | final public static String OPENED(Code) | | Notification type string for a connection-opened notification.
|
JMXConnectionNotification | public JMXConnectionNotification(String type, Object source, String connectionId, long sequenceNumber, String message, Object userData)(Code) | | Constructs a new connection notification. The
JMXConnectionNotification.getSource() source of the notification depends on whether it
is being sent by a connector server or a connector client:
- For a connector server, if it is registered in an MBean
server, the source is the
ObjectName under which it is
registered. Otherwise, it is a reference to the connector
server object itself, an instance of a subclass of
JMXConnectorServer .
- For a connector client, the source is a reference to the
connector client object, an instance of a class implementing
JMXConnector .
Parameters: type - the type of the notification. This is usually oneof the constants JMXConnectionNotification.OPENED, JMXConnectionNotification.CLOSED, JMXConnectionNotification.FAILED, JMXConnectionNotification.NOTIFS_LOST. It is not an error for it tobe a different string. Parameters: source - the connector server or client emitting thenotification. Parameters: connectionId - the ID of the connection within itsconnector server. Parameters: sequenceNumber - a non-negative integer. It is expectedbut not required that this number will be greater than anyprevious sequenceNumber in a notification fromthis source. Parameters: message - an unspecified text message, typically containinga human-readable description of the event. Can be null. Parameters: userData - an object whose type and meaning is defined bythe connector server. Can be null. exception: NullPointerException - if type ,source , or connectionId is null. exception: IllegalArgumentException - ifsequenceNumber is negative. |
getConnectionId | public String getConnectionId()(Code) | | The connection ID to which this notification pertains.
the connection ID. |
|
|