javax.management.remote
Class NotificationResult

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.management.remote.NotificationResult
All Implemented Interfaces:
Serializable sample code for java.io.Serializable definition code for java.io.Serializable

public class NotificationResult
extends Object sample code for java.lang.Object definition code for java.lang.Object
implements Serializable sample code for java.io.Serializable definition code for java.io.Serializable

Result of a query for buffered notifications. Notifications in a notification buffer have positive, monotonically increasing sequence numbers. The result of a notification query contains the following elements:

It is possible for the nextSequenceNumber to be less than the earliestSequenceNumber. This signifies that notifications between the two might have been lost.

Since:
1.5
See Also:
Serialized Form

Constructor Summary
NotificationResult sample code for javax.management.remote.NotificationResult.NotificationResult(long, long, javax.management.remote.TargetedNotification[]) definition code for javax.management.remote.NotificationResult.NotificationResult(long, long, javax.management.remote.TargetedNotification[]) (long earliestSequenceNumber, long nextSequenceNumber, TargetedNotification sample code for javax.management.remote.TargetedNotification definition code for javax.management.remote.TargetedNotification [] targetedNotifications)
          Constructs a notification query result.
 
Method Summary
 long getEarliestSequenceNumber sample code for javax.management.remote.NotificationResult.getEarliestSequenceNumber() definition code for javax.management.remote.NotificationResult.getEarliestSequenceNumber() ()
          Returns the sequence number of the earliest notification still in the buffer.
 long getNextSequenceNumber sample code for javax.management.remote.NotificationResult.getNextSequenceNumber() definition code for javax.management.remote.NotificationResult.getNextSequenceNumber() ()
          Returns the sequence number of the next notification available for querying.
 TargetedNotification sample code for javax.management.remote.TargetedNotification definition code for javax.management.remote.TargetedNotification [] getTargetedNotifications sample code for javax.management.remote.NotificationResult.getTargetedNotifications() definition code for javax.management.remote.NotificationResult.getTargetedNotifications() ()
          Returns the notifications resulting from the query, and the listeners they correspond to.
 String sample code for java.lang.String definition code for java.lang.String toString sample code for javax.management.remote.NotificationResult.toString() definition code for javax.management.remote.NotificationResult.toString() ()
          Returns a string representation of the 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

NotificationResult sample code for javax.management.remote.NotificationResult(long, long, javax.management.remote.TargetedNotification[]) definition code for javax.management.remote.NotificationResult(long, long, javax.management.remote.TargetedNotification[])

public NotificationResult(long earliestSequenceNumber,
                          long nextSequenceNumber,
                          TargetedNotification sample code for javax.management.remote.TargetedNotification definition code for javax.management.remote.TargetedNotification [] targetedNotifications)

Constructs a notification query result.

Parameters:
earliestSequenceNumber - the sequence number of the earliest notification still in the buffer.
nextSequenceNumber - the sequence number of the next notification available for querying.
targetedNotifications - the notifications resulting from the query, and the listeners they correspond to. This array can be empty.
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if targetedNotifications is null or if earliestSequenceNumber or nextSequenceNumber is negative.
Method Detail

getEarliestSequenceNumber sample code for javax.management.remote.NotificationResult.getEarliestSequenceNumber() definition code for javax.management.remote.NotificationResult.getEarliestSequenceNumber()

public long getEarliestSequenceNumber()
Returns the sequence number of the earliest notification still in the buffer.

Returns:
the sequence number of the earliest notification still in the buffer.

getNextSequenceNumber sample code for javax.management.remote.NotificationResult.getNextSequenceNumber() definition code for javax.management.remote.NotificationResult.getNextSequenceNumber()

public long getNextSequenceNumber()
Returns the sequence number of the next notification available for querying.

Returns:
the sequence number of the next notification available for querying.

getTargetedNotifications sample code for javax.management.remote.NotificationResult.getTargetedNotifications() definition code for javax.management.remote.NotificationResult.getTargetedNotifications()

public TargetedNotification sample code for javax.management.remote.TargetedNotification definition code for javax.management.remote.TargetedNotification [] getTargetedNotifications()
Returns the notifications resulting from the query, and the listeners they correspond to.

Returns:
the notifications resulting from the query, and the listeners they correspond to. This array can be empty.

toString sample code for javax.management.remote.NotificationResult.toString() definition code for javax.management.remote.NotificationResult.toString()

public String sample code for java.lang.String definition code for java.lang.String  toString()
Returns a string representation of the 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 the object.