javax.management.remote
Class JMXConnectionNotification

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.util.EventObject sample code for java.util.EventObject definition code for java.util.EventObject 
      extended by javax.management.Notification sample code for javax.management.Notification definition code for javax.management.Notification 
          extended by javax.management.remote.JMXConnectionNotification
All Implemented Interfaces:
Serializable sample code for java.io.Serializable definition code for java.io.Serializable

public class JMXConnectionNotification
extends Notification sample code for javax.management.Notification definition code for javax.management.Notification

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 sample code for javax.management.remote.JMXConnectorServer definition code for javax.management.remote.JMXConnectorServer ) and by connector clients (instances of JMXConnector sample code for javax.management.remote.JMXConnector definition code for javax.management.remote.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() sample code for java.lang.System.currentTimeMillis() definition code for java.lang.System.currentTimeMillis() ) indicating when the notification was constructed.

Since:
1.5
See Also:
Serialized Form

Field Summary
static String sample code for java.lang.String definition code for java.lang.String CLOSED sample code for javax.management.remote.JMXConnectionNotification.CLOSED definition code for javax.management.remote.JMXConnectionNotification.CLOSED
          Notification type string for a connection-closed notification.
static String sample code for java.lang.String definition code for java.lang.String FAILED sample code for javax.management.remote.JMXConnectionNotification.FAILED definition code for javax.management.remote.JMXConnectionNotification.FAILED
          Notification type string for a connection-failed notification.
static String sample code for java.lang.String definition code for java.lang.String NOTIFS_LOST sample code for javax.management.remote.JMXConnectionNotification.NOTIFS_LOST definition code for javax.management.remote.JMXConnectionNotification.NOTIFS_LOST
          Notification type string for a connection that has possibly lost notifications.
static String sample code for java.lang.String definition code for java.lang.String OPENED sample code for javax.management.remote.JMXConnectionNotification.OPENED definition code for javax.management.remote.JMXConnectionNotification.OPENED
          Notification type string for a connection-opened notification.
 
Fields inherited from class javax.management.Notification sample code for javax.management.Notification definition code for javax.management.Notification
source sample code for javax.management.Notification.source definition code for javax.management.Notification.source
 
Constructor Summary
JMXConnectionNotification sample code for javax.management.remote.JMXConnectionNotification.JMXConnectionNotification(java.lang.String, java.lang.Object, java.lang.String, long, java.lang.String, java.lang.Object) definition code for javax.management.remote.JMXConnectionNotification.JMXConnectionNotification(java.lang.String, java.lang.Object, java.lang.String, long, java.lang.String, java.lang.Object) (String sample code for java.lang.String definition code for java.lang.String  type, Object sample code for java.lang.Object definition code for java.lang.Object  source, String sample code for java.lang.String definition code for java.lang.String  connectionId, long sequenceNumber, 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)
          Constructs a new connection notification.
 
Method Summary
 String sample code for java.lang.String definition code for java.lang.String getConnectionId sample code for javax.management.remote.JMXConnectionNotification.getConnectionId() definition code for javax.management.remote.JMXConnectionNotification.getConnectionId() ()
          The connection ID to which this notification pertains.
 
Methods inherited from class javax.management.Notification sample code for javax.management.Notification definition code for javax.management.Notification
getMessage sample code for javax.management.Notification.getMessage() definition code for javax.management.Notification.getMessage() , getSequenceNumber sample code for javax.management.Notification.getSequenceNumber() definition code for javax.management.Notification.getSequenceNumber() , getTimeStamp sample code for javax.management.Notification.getTimeStamp() definition code for javax.management.Notification.getTimeStamp() , getType sample code for javax.management.Notification.getType() definition code for javax.management.Notification.getType() , getUserData sample code for javax.management.Notification.getUserData() definition code for javax.management.Notification.getUserData() , setSequenceNumber sample code for javax.management.Notification.setSequenceNumber(long) definition code for javax.management.Notification.setSequenceNumber(long) , setSource sample code for javax.management.Notification.setSource(java.lang.Object) definition code for javax.management.Notification.setSource(java.lang.Object) , setTimeStamp sample code for javax.management.Notification.setTimeStamp(long) definition code for javax.management.Notification.setTimeStamp(long) , setUserData sample code for javax.management.Notification.setUserData(java.lang.Object) definition code for javax.management.Notification.setUserData(java.lang.Object) , toString sample code for javax.management.Notification.toString() definition code for javax.management.Notification.toString()
 
Methods inherited from class java.util.EventObject sample code for java.util.EventObject definition code for java.util.EventObject
getSource sample code for java.util.EventObject.getSource() definition code for java.util.EventObject.getSource()
 
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)
 

Field Detail

OPENED sample code for javax.management.remote.JMXConnectionNotification.OPENED

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

Notification type string for a connection-opened notification.

See Also:
Constant Field Values

CLOSED sample code for javax.management.remote.JMXConnectionNotification.CLOSED

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

Notification type string for a connection-closed notification.

See Also:
Constant Field Values

FAILED sample code for javax.management.remote.JMXConnectionNotification.FAILED

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

Notification type string for a connection-failed notification.

See Also:
Constant Field Values

NOTIFS_LOST sample code for javax.management.remote.JMXConnectionNotification.NOTIFS_LOST

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

Notification type string for a connection that has possibly lost notifications.

See Also:
Constant Field Values
Constructor Detail

JMXConnectionNotification sample code for javax.management.remote.JMXConnectionNotification(java.lang.String, java.lang.Object, java.lang.String, long, java.lang.String, java.lang.Object) definition code for javax.management.remote.JMXConnectionNotification(java.lang.String, java.lang.Object, java.lang.String, long, java.lang.String, java.lang.Object)

public JMXConnectionNotification(String sample code for java.lang.String definition code for java.lang.String  type,
                                 Object sample code for java.lang.Object definition code for java.lang.Object  source,
                                 String sample code for java.lang.String definition code for java.lang.String  connectionId,
                                 long sequenceNumber,
                                 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)
Constructs a new connection notification. The source sample code for java.util.EventObject.getSource() definition code for java.util.EventObject.getSource() of the notification depends on whether it is being sent by a connector server or a connector client:

Parameters:
type - the type of the notification. This is usually one of the constants OPENED sample code for javax.management.remote.JMXConnectionNotification.OPENED definition code for javax.management.remote.JMXConnectionNotification.OPENED , CLOSED sample code for javax.management.remote.JMXConnectionNotification.CLOSED definition code for javax.management.remote.JMXConnectionNotification.CLOSED , FAILED sample code for javax.management.remote.JMXConnectionNotification.FAILED definition code for javax.management.remote.JMXConnectionNotification.FAILED , NOTIFS_LOST sample code for javax.management.remote.JMXConnectionNotification.NOTIFS_LOST definition code for javax.management.remote.JMXConnectionNotification.NOTIFS_LOST . It is not an error for it to be a different string.
source - the connector server or client emitting the notification.
connectionId - the ID of the connection within its connector server.
sequenceNumber - a non-negative integer. It is expected but not required that this number will be greater than any previous sequenceNumber in a notification from this source.
message - an unspecified text message, typically containing a human-readable description of the event. Can be null.
userData - an object whose type and meaning is defined by the connector server. Can be null.
Throws:
NullPointerException sample code for java.lang.NullPointerException definition code for java.lang.NullPointerException - if type, source, or connectionId is null.
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if sequenceNumber is negative.
Method Detail

getConnectionId sample code for javax.management.remote.JMXConnectionNotification.getConnectionId() definition code for javax.management.remote.JMXConnectionNotification.getConnectionId()

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

The connection ID to which this notification pertains.

Returns:
the connection ID.