javax.management.remote
Class TargetedNotification

java.lang.Object
  extended by javax.management.remote.TargetedNotification
All Implemented Interfaces:
Serializable

public class TargetedNotification
extends Object
implements Serializable

Wraps a notification with an identifier that specifies the listener which received it.

Since:
1.5
See Also:
Serialized Form

Constructor Summary
TargetedNotification(Notification notif, Integer id)
          Constructs a new TargetedNotification which connects the supplied notification with the specified identifier.
 
Method Summary
 Integer getListenerID()
          Returns the identifier for the listener which received the notification.
 Notification getNotification()
          Returns the notification.
 String toString()
          Returns a textual representation of the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TargetedNotification

public TargetedNotification(Notification notif,
                            Integer id)
Constructs a new TargetedNotification which connects the supplied notification with the specified identifier. The identifier matches one of those returned by a previous call to add a new notification listener.

Parameters:
notif - the notification.
id - the identifier of the listener that received the notification.
Throws:
IllegalArgumentException - if either argument is null.
Method Detail

getNotification

public Notification getNotification()
Returns the notification.

Returns:
the notification.

getListenerID

public Integer getListenerID()
Returns the identifier for the listener which received the notification.

Returns:
the identifier.

toString

public String toString()
Returns a textual representation of the object.

Overrides:
toString in class Object
Returns:
a textual representation.
See Also:
Object.getClass(), Object.hashCode(), Class.getName(), Integer.toHexString(int)