javax.management.remote
Class TargetedNotification

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.management.remote.TargetedNotification
All Implemented Interfaces:
Serializable sample code for java.io.Serializable definition code for java.io.Serializable

public class TargetedNotification
extends Object sample code for java.lang.Object definition code for java.lang.Object
implements Serializable sample code for java.io.Serializable definition code for java.io.Serializable

A (Notification, Listener ID) pair.

This class is used to associate an emitted notification with the listener ID to which it is targeted.

Since:
1.5
See Also:
Serialized Form

Constructor Summary
TargetedNotification sample code for javax.management.remote.TargetedNotification.TargetedNotification(javax.management.Notification, java.lang.Integer) definition code for javax.management.remote.TargetedNotification.TargetedNotification(javax.management.Notification, java.lang.Integer) (Notification sample code for javax.management.Notification definition code for javax.management.Notification  notification, Integer sample code for java.lang.Integer definition code for java.lang.Integer  listenerID)
          Constructs a TargetedNotification object.
 
Method Summary
 Integer sample code for java.lang.Integer definition code for java.lang.Integer getListenerID sample code for javax.management.remote.TargetedNotification.getListenerID() definition code for javax.management.remote.TargetedNotification.getListenerID() ()
          The ID of the listener to which the notification is targeted.
 Notification sample code for javax.management.Notification definition code for javax.management.Notification getNotification sample code for javax.management.remote.TargetedNotification.getNotification() definition code for javax.management.remote.TargetedNotification.getNotification() ()
          The emitted notification.
 String sample code for java.lang.String definition code for java.lang.String toString sample code for javax.management.remote.TargetedNotification.toString() definition code for javax.management.remote.TargetedNotification.toString() ()
          Returns a textual representation of this Targeted Notification.
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

TargetedNotification sample code for javax.management.remote.TargetedNotification(javax.management.Notification, java.lang.Integer) definition code for javax.management.remote.TargetedNotification(javax.management.Notification, java.lang.Integer)

public TargetedNotification(Notification sample code for javax.management.Notification definition code for javax.management.Notification  notification,
                            Integer sample code for java.lang.Integer definition code for java.lang.Integer  listenerID)

Constructs a TargetedNotification object. The object contains a pair (Notification, Listener ID). The Listener ID identifies the client listener to which that notification is targeted. The client listener ID is one previously returned by the connector server in response to an addNotificationListener request.

Parameters:
notification - Notification emitted from the MBean server.
listenerID - The ID of the listener to which this notification is targeted.
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if the listenerID or notification is null.
Method Detail

getNotification sample code for javax.management.remote.TargetedNotification.getNotification() definition code for javax.management.remote.TargetedNotification.getNotification()

public Notification sample code for javax.management.Notification definition code for javax.management.Notification  getNotification()

The emitted notification.

Returns:
The notification.

getListenerID sample code for javax.management.remote.TargetedNotification.getListenerID() definition code for javax.management.remote.TargetedNotification.getListenerID()

public Integer sample code for java.lang.Integer definition code for java.lang.Integer  getListenerID()

The ID of the listener to which the notification is targeted.

Returns:
The listener ID.

toString sample code for javax.management.remote.TargetedNotification.toString() definition code for javax.management.remote.TargetedNotification.toString()

public String sample code for java.lang.String definition code for java.lang.String  toString()
Returns a textual representation of this Targeted Notification.

Overrides:
toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() in class Object sample code for java.lang.Object definition code for java.lang.Object
Returns:
a String representation of this Targeted Notification.