01: /*
02: * Copyright (C) The MX4J Contributors.
03: * All rights reserved.
04: *
05: * This software is distributed under the terms of the MX4J License version 1.0.
06: * See the terms of the MX4J License in the documentation provided with this software.
07: */
08:
09: package javax.management.remote;
10:
11: import java.io.Serializable;
12: import javax.management.Notification;
13:
14: /**
15: * @version $Revision: 1.4 $
16: */
17: public class TargetedNotification implements Serializable {
18: /**
19: * @serial The notification to transmit
20: */
21: private final Notification notif;
22: /**
23: * @serial The listener's ID for the notification
24: */
25: private final Integer id;
26:
27: public TargetedNotification(Notification notif, Integer id) {
28: this .notif = notif;
29: this .id = id;
30: }
31:
32: public Notification getNotification() {
33: return notif;
34: }
35:
36: public Integer getListenerID() {
37: return id;
38: }
39:
40: public String toString() {
41: StringBuffer buffer = new StringBuffer(
42: "TargetedNotification[id=");
43: buffer.append(getListenerID()).append(", notification=");
44: buffer.append(getNotification()).append("]");
45: return buffer.toString();
46: }
47: }
|