javax.management.remote
public class NotificationResult extends Object implements Serializable
Wraps the result of a query for buffered notifications. In a remote scenario, it may be more practical for the server to buffer individual notifications from its beans and then return them in bulk on request. This class contains the notifications returned by such a request.
It consists of a series of Notification and identifier pairs, wrapped in a TargetedNotification object. The identifiers serve to pair up the notification with the listener that requested it. Two positive numbers are also included: the first sequence number used by the returned notifications, and the sequence number of the notification which will be returned by the next query. The first sequence number may be greater than the next sequence number if some notifications have been lost.
Since: 1.5
Constructor Summary | |
---|---|
NotificationResult(long startSeqNumber, long nextSeqNumber, TargetedNotification[] notifications)
Constructs a new NotificationResult using the specified
sequence numbers and the supplied array of notification pairs.
|
Method Summary | |
---|---|
long | getEarliestSequenceNumber()
Returns the sequence number of the earliest notification
in the buffer.
|
long | getNextSequenceNumber()
Returns the sequence number of the next notification to
be returned by a future query.
|
TargetedNotification[] | getTargetedNotifications()
Returns the notification and identifier pairs returned
by the query.
|
String | toString()
Returns a textual representation of the object.
|
Parameters: startSeqNumber the sequence number of the first notification being returned. nextSeqNumber the sequence numbr of the next notification that will be returned from a future query. notifications the notification and identifier pairs. This may be empty.
Throws: IllegalArgumentException if a sequence number is negative
or notifications
is
null
.
Returns: the sequence number of the earliest notification.
Returns: the sequence number of the next notification.
Returns: the notification and identifier pairs.
Returns: a textual representation.