APIdia Launch Partner
Top Description Fields Constructors Methods
javax.management.remote

public Class NotificationResult

extends Object
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Imports
java.io.IOException, .InvalidObjectException, .ObjectInputStream, .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.

Since
1.5

Field Summary

Modifier and TypeField and Description
private long
private long
private static final long
private TargetedNotification[]

Constructor Summary

AccessConstructor and Description
public
NotificationResult(long
the sequence number of the earliest notification still in the buffer.
earliestSequenceNumber
,
long
the sequence number of the next notification available for querying.
nextSequenceNumber
,
TargetedNotification[]
the notifications resulting from the query, and the listeners they correspond to. This array can be empty.
targetedNotifications
)

Constructs a notification query result.

Method Summary

Modifier and TypeMethod and Description
public long

Returns:

the sequence number of the earliest notification still in the buffer.
getEarliestSequenceNumber
()

Returns the sequence number of the earliest notification still in the buffer.

public long

Returns:

the sequence number of the next notification available for querying.
getNextSequenceNumber
()

Returns the sequence number of the next notification available for querying.

public TargetedNotification[]

Returns:

the notifications resulting from the query, and the listeners they correspond to. This array can be empty.
getTargetedNotifications
()

Returns the notifications resulting from the query, and the listeners they correspond to.

private void
public String

Returns:

a string representation of the object.
toString
()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

private static void
validate(TargetedNotification[] targetedNotifications, long earliestSequenceNumber, long nextSequenceNumber)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

earliestSequenceNumberback to summary
private long earliestSequenceNumber
nextSequenceNumberback to summary
private long nextSequenceNumber
serialVersionUIDback to summary
private static final long serialVersionUID
targetedNotificationsback to summary
private TargetedNotification[] targetedNotifications

Constructor Detail

NotificationResultback to summary
public NotificationResult(long earliestSequenceNumber, long nextSequenceNumber, TargetedNotification[] targetedNotifications)

Constructs a notification query result.

Parameters
earliestSequenceNumber:long

the sequence number of the earliest notification still in the buffer.

nextSequenceNumber:long

the sequence number of the next notification available for querying.

targetedNotifications:TargetedNotification[]

the notifications resulting from the query, and the listeners they correspond to. This array can be empty.

Exceptions
IllegalArgumentException:
if targetedNotifications is null or if earliestSequenceNumber or nextSequenceNumber is negative.

Method Detail

getEarliestSequenceNumberback to summary
public long getEarliestSequenceNumber()

Returns the sequence number of the earliest notification still in the buffer.

Returns:long

the sequence number of the earliest notification still in the buffer.

getNextSequenceNumberback to summary
public long getNextSequenceNumber()

Returns the sequence number of the next notification available for querying.

Returns:long

the sequence number of the next notification available for querying.

getTargetedNotificationsback to summary
public TargetedNotification[] getTargetedNotifications()

Returns the notifications resulting from the query, and the listeners they correspond to.

Returns:TargetedNotification[]

the notifications resulting from the query, and the listeners they correspond to. This array can be empty.

readObjectback to summary
private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object. The result should be a concise but informative representation that is easy for a person to read.

Returns:String

a string representation of the object.

validateback to summary
private static void validate(TargetedNotification[] targetedNotifications, long earliestSequenceNumber, long nextSequenceNumber) throws IllegalArgumentException