- java.lang.Object
-
- javax.management.remote.NotificationResult
-
- All Implemented Interfaces:
- Serializable
public class NotificationResult extends Object implements 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 theearliestSequenceNumber
. This signifies that notifications between the two might have been lost.- Since:
- 1.5
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description NotificationResult(long earliestSequenceNumber, long nextSequenceNumber, TargetedNotification[] targetedNotifications)
Constructs a notification query result.
-
Method Summary
Methods Modifier and Type Method and Description long
getEarliestSequenceNumber()
Returns the sequence number of the earliest notification still in the buffer.long
getNextSequenceNumber()
Returns the sequence number of the next notification available for querying.TargetedNotification[]
getTargetedNotifications()
Returns the notifications resulting from the query, and the listeners they correspond to.String
toString()
Returns a string representation of the object.
-
-
-
Constructor Detail
-
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
- iftargetedNotifications
is null or ifearliestSequenceNumber
ornextSequenceNumber
is negative.
-
-
Method Detail
-
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
public 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.
-
-
Document created the 11/06/2005, last modified the 04/03/2020
Source of the printed document:https://www.gaudry.be/en/java-api-rf-javax/management/remote/notificationresult.html
The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.
References
These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author This site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.