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

public Class TargetedNotification

extends Object
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Imports
java.io.IOException, .InvalidObjectException, .ObjectInputStream, .Serializable, javax.management.Notification

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

Field Summary

Modifier and TypeField and Description
private Integer
private Notification
private static final long

Constructor Summary

AccessConstructor and Description
public
TargetedNotification(Notification
Notification emitted from the MBean server.
notification
,
Integer
The ID of the listener to which this notification is targeted.
listenerID
)

Constructs a TargetedNotification object.

Method Summary

Modifier and TypeMethod and Description
public Integer

Returns:

The listener ID.
getListenerID
()

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

public Notification

Returns:

The notification.
getNotification
()

The emitted notification.

private void
public String

Returns:

a String representation of this Targeted Notification.
toString
()

Overrides java.lang.Object.toString.

Returns a textual representation of this Targeted Notification.

private static void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

idback to summary
private Integer id
See Also
getListenerID()
notifback to summary
private Notification notif
See Also
getNotification()
serialVersionUIDback to summary
private static final long serialVersionUID

Constructor Detail

TargetedNotificationback to summary
public TargetedNotification(Notification notification, 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

Notification emitted from the MBean server.

listenerID:Integer

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

Exceptions
IllegalArgumentException:
if the listenerID or notification is null.

Method Detail

getListenerIDback to summary
public Integer getListenerID()

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

Returns:Integer

The listener ID.

getNotificationback to summary
public Notification getNotification()

The emitted notification.

Returns:Notification

The notification.

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

Overrides java.lang.Object.toString.

Returns a textual representation of this Targeted Notification.

Returns:String

a String representation of this Targeted Notification.

validateback to summary
private static void validate(Notification notif, Integer id) throws IllegalArgumentException