IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
 
[Sommaire]  [Top 50]  [F.A.Q.]  [ Java SE ]  [ Java EE ]  [Javadoc standard]  [Contact]
[ 1.4.2 ]  [ 5.0 ]  [ 6.0
Rechercher   
Dans
Options   sensible à la casse
étendre la recherche aux descriptions
Préférences
fr en 
 
Moteurs de recherche
JavaTM 2 Platform Std. Ed. v1.6.0

javax.management.remote
Class NotificationResult

java.lang.Object
  extended by 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 the earliestSequenceNumber. This signifies that notifications between the two might have been lost.

Since:
1.5
See Also:
Serialized Form

Constructor Summary
NotificationResult(long earliestSequenceNumber, long nextSequenceNumber, TargetedNotification[] targetedNotifications)
          Constructs a notification query result.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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 - if targetedNotifications is null or if earliestSequenceNumber or nextSequenceNumber 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.

toString

public String 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.

Overrides:
toString in class Object
Returns:
a string representation of the object.

Copyright 2003 Sun Microsystems, Inc. All rights reserved