Class NotificationResult
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 Summary
ConstructorsConstructorDescriptionNotificationResult(long earliestSequenceNumber, long nextSequenceNumber, TargetedNotification[] targetedNotifications) Constructs a notification query result. -
Method Summary
Modifier 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.Methods declared in class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitModifier and TypeMethodDescriptionprotected Objectclone()Answers a new instance of the same class as the receiver, whose slots have been filled in with the values in the slots of the receiver.booleanCompares the argument to the receiver, and answers true if they represent the same object using a class specific comparison.protected voidfinalize()Deprecated, for removal: This API element is subject to removal in a future version.May cause performance issues, deadlocks and hangs.getClass()Answers the unique instance of java.lang.Class which represents the class of the receiver.inthashCode()Answers an integer hash code for the receiver.final voidnotify()Causes one thread which iswaiting on the receiver to be made ready to run.final voidCauses all threads which arewaiting on the receiver to be made ready to run.final voidwait()Causes the thread which sent this message to be made not ready to run pending some change in the receiver (as indicated bynotifyornotifyAll).final voidwait(long time) Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated bynotifyornotifyAll) or the expiration of the timeout.final voidwait(long time, int frac) Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated bynotifyornotifyAll) or the expiration of the timeout.
-
Constructor Details
-
NotificationResult
public 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- iftargetedNotificationsis null or ifearliestSequenceNumberornextSequenceNumberis negative.
-
-
Method Details
-
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
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
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
-