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:
It is possible for the nextSequenceNumber
to be less
than the earliestSequenceNumber
. This signifies that
notifications between the two might have been lost.
Constructor and Description |
---|
NotificationResult(long earliestSequenceNumber,
long nextSequenceNumber,
TargetedNotification[] targetedNotifications)
Constructs a notification query result.
|
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.
|
public NotificationResult(long earliestSequenceNumber, long nextSequenceNumber, TargetedNotification[] targetedNotifications)
Constructs a notification query result.
IllegalArgumentException
- if
targetedNotifications
is null or if
earliestSequenceNumber
or
nextSequenceNumber
is negative.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.public long getEarliestSequenceNumber()
public long getNextSequenceNumber()
public TargetedNotification[] getTargetedNotifications()
aicas GmbH, Karlsruhe, Germany —www.aicas.com
Copyright © 2001-2019 aicas GmbH. All Rights Reserved.