1 /*
2 * Copyright (c) 1999, 2003, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
57 /**
58 * Notification type which indicates that the observed MBean attribute value has changed.
59 * <BR>The value of this type string is <CODE>jmx.attribute.change</CODE>.
60 */
61 public static final String ATTRIBUTE_CHANGE = "jmx.attribute.change";
62
63
64 /**
65 * @serial The MBean attribute name.
66 */
67 private String attributeName = null;
68
69 /**
70 * @serial The MBean attribute type.
71 */
72 private String attributeType = null;
73
74 /**
75 * @serial The MBean attribute old value.
76 */
77 private Object oldValue = null;
78
79 /**
80 * @serial The MBean attribute new value.
81 */
82 private Object newValue = null;
83
84
85 /**
86 * Constructs an attribute change notification object.
87 * In addition to the information common to all notification, the caller must supply the name and type
88 * of the attribute, as well as its old and new values.
89 *
90 * @param source The notification producer, that is, the MBean the attribute belongs to.
91 * @param sequenceNumber The notification sequence number within the source object.
92 * @param timeStamp The date at which the notification is being sent.
93 * @param msg A String containing the message of the notification.
94 * @param attributeName A String giving the name of the attribute.
95 * @param attributeType A String containing the type of the attribute.
96 * @param oldValue An object representing value of the attribute before the change.
97 * @param newValue An object representing value of the attribute after the change.
98 */
99 public AttributeChangeNotification(Object source, long sequenceNumber, long timeStamp, String msg,
100 String attributeName, String attributeType, Object oldValue, Object newValue) {
101
|
1 /*
2 * Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
57 /**
58 * Notification type which indicates that the observed MBean attribute value has changed.
59 * <BR>The value of this type string is <CODE>jmx.attribute.change</CODE>.
60 */
61 public static final String ATTRIBUTE_CHANGE = "jmx.attribute.change";
62
63
64 /**
65 * @serial The MBean attribute name.
66 */
67 private String attributeName = null;
68
69 /**
70 * @serial The MBean attribute type.
71 */
72 private String attributeType = null;
73
74 /**
75 * @serial The MBean attribute old value.
76 */
77 @SuppressWarnings("serial") // Conditionally serializable
78 private Object oldValue = null;
79
80 /**
81 * @serial The MBean attribute new value.
82 */
83 @SuppressWarnings("serial") // Conditionally serializable
84 private Object newValue = null;
85
86
87 /**
88 * Constructs an attribute change notification object.
89 * In addition to the information common to all notification, the caller must supply the name and type
90 * of the attribute, as well as its old and new values.
91 *
92 * @param source The notification producer, that is, the MBean the attribute belongs to.
93 * @param sequenceNumber The notification sequence number within the source object.
94 * @param timeStamp The date at which the notification is being sent.
95 * @param msg A String containing the message of the notification.
96 * @param attributeName A String giving the name of the attribute.
97 * @param attributeType A String containing the type of the attribute.
98 * @param oldValue An object representing value of the attribute before the change.
99 * @param newValue An object representing value of the attribute after the change.
100 */
101 public AttributeChangeNotification(Object source, long sequenceNumber, long timeStamp, String msg,
102 String attributeName, String attributeType, Object oldValue, Object newValue) {
103
|