java.lang.Object
javax.management.remote.NotificationResult
- All Implemented Interfaces:
- 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:
- The sequence number of the earliest notification still in the buffer.
- The sequence number of the next notification available for querying. This will be the starting sequence number for the next notification query.
- An array of (Notification,listenerID) pairs corresponding to the returned notifications and the listeners they correspond to.
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:
- 
Constructor SummaryConstructorsConstructorDescriptionNotificationResult(long earliestSequenceNumber, long nextSequenceNumber, TargetedNotification[] targetedNotifications) Constructs a notification query result.
- 
Method SummaryModifier and TypeMethodDescriptionlongReturns the sequence number of the earliest notification still in the buffer.longReturns the sequence number of the next notification available for querying.Returns the notifications resulting from the query, and the listeners they correspond to.toString()Returns a string representation of the object.
- 
Constructor Details- 
NotificationResultpublic NotificationResult(long earliestSequenceNumber, long nextSequenceNumber, 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- if- targetedNotificationsis null or if- earliestSequenceNumberor- nextSequenceNumberis negative.
 
 
- 
- 
Method Details- 
getEarliestSequenceNumberpublic 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.
 
- 
getNextSequenceNumberpublic long getNextSequenceNumber()Returns the sequence number of the next notification available for querying.- Returns:
- the sequence number of the next notification available for querying.
 
- 
getTargetedNotificationsReturns 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.
 
- 
toStringReturns a string representation of the object. The result should be a concise but informative representation that is easy for a person to read.
 
-