javax.management.remote

Class TargetedNotification

public class TargetedNotification extends Object implements Serializable

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

Since: 1.5

Constructor Summary
TargetedNotification(Notification notif, Integer id)
Constructs a new TargetedNotification which connects the supplied notification with the specified identifier.
Method Summary
IntegergetListenerID()
Returns the identifier for the listener which received the notification.
NotificationgetNotification()
Returns the notification.
StringtoString()
Returns a textual representation of the object.

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

getListenerID

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

Returns: the identifier.

getNotification

public Notification getNotification()
Returns the notification.

Returns: the notification.

toString

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

Returns: a textual representation.