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.
// If we replace Integer with int...
// /**
// * <p>Constructs a <code>TargetedNotification</code> 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
// * <code>addNotificationListener</code> request.</p>
// * @param notification Notification emitted from the MBean server.
// * @param listenerID The ID of the listener to which this
// * notification is targeted.
// */
// public TargetedNotification(Notification notification,
// int listenerID) {
// this.notif = notification;
// this.id = listenerID;
// }
// If we replace integer with int...
// this(notification,intValue(listenerID));
if (notification == null) throw new
IllegalArgumentException("Invalid notification: null");
if (listenerID == null) throw new
IllegalArgumentException("Invalid listener ID: null");
this.notif = notification;
this.id = listenerID;