2362N/A * Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * <p>The Notification class represents a notification emitted by an 0N/A * MBean. It contains a reference to the source MBean: if the 0N/A * notification has been forwarded through the MBean server, and the 0N/A * original source of the notification was a reference to the emitting 0N/A * MBean object, then the MBean server replaces it by the MBean's 0N/A * ObjectName. If the listener has registered directly with the 0N/A * MBean, this is either the object name or a direct reference to the 0N/A * <p>It is strongly recommended that notification senders use the 0N/A * object name rather than a reference to the MBean object as the 0N/A * <p>The <b>serialVersionUID</b> of this class is <code>-7516092053498031989L</code>. 0N/A // Serialization compatibility stuff: 0N/A // Two serial forms are supported in this class. The selected form depends 0N/A // on system property "jmx.serial.form": 0N/A // - "1.0" for JMX 1.0 0N/A // - any other value for JMX 1.1 and higher 0N/A // Serial version for old serial form 0N/A // Serial version for new serial form 0N/A // Serializable fields in old serial form 0N/A // Serializable fields in new serial form 0N/A // Actual serial version and serial form 0N/A * @serialField type String The notification type. 0N/A * A string expressed in a dot notation similar to Java properties. 0N/A * An example of a notification type is network.alarm.router 0N/A * @serialField sequenceNumber long The notification sequence number. 0N/A * A serial number which identify particular instance 0N/A * of notification in the context of the notification source. 0N/A * @serialField timeStamp long The notification timestamp. 0N/A * Indicating when the notification was generated 0N/A * @serialField userData Object The notification user data. 0N/A * Used for whatever other data the notification 0N/A * source wishes to communicate to its consumers 0N/A * @serialField message String The notification message. 0N/A * @serialField source Object The object on which the notification initially occurred. 0N/A // OK: exception means no compat with 1.0, too bad 0N/A // END Serialization compatibility stuff 0N/A * @serial The notification type. 0N/A * A string expressed in a dot notation similar to Java properties. 0N/A * An example of a notification type is network.alarm.router 0N/A * @serial The notification sequence number. 0N/A * A serial number which identify particular instance 0N/A * of notification in the context of the notification source. 0N/A * @serial The notification timestamp. 0N/A * Indicating when the notification was generated 0N/A * @serial The notification user data. 0N/A * Used for whatever other data the notification 0N/A * source wishes to communicate to its consumers 0N/A * @serial The notification message. 0N/A * <p>This field hides the {@link EventObject#source} field in the 0N/A * parent class to make it non-transient and therefore part of the 0N/A * serialized form.</p> 0N/A * @serial The object on which the notification initially occurred. 0N/A * Creates a Notification object. 0N/A * The notification timeStamp is set to the current date. 0N/A * @param type The notification type. 0N/A * @param source The notification source. 0N/A * @param sequenceNumber The notification sequence number within the source object. 0N/A * Creates a Notification object. 0N/A * The notification timeStamp is set to the current date. 0N/A * @param type The notification type. 0N/A * @param source The notification source. 0N/A * @param sequenceNumber The notification sequence number within the source object. 0N/A * @param message The detailed message. 0N/A * Creates a Notification object. 0N/A * @param type The notification type. 0N/A * @param source The notification source. 0N/A * @param sequenceNumber The notification sequence number within the source object. 0N/A * @param timeStamp The notification emission date. 0N/A * Creates a Notification object. 0N/A * @param type The notification type. 0N/A * @param source The notification source. 0N/A * @param sequenceNumber The notification sequence number within the source object. 0N/A * @param timeStamp The notification emission date. 0N/A * @param message The detailed message. 0N/A * @param source the new source for this object. 0N/A * @see EventObject#getSource 0N/A * Get the notification sequence number. 0N/A * @return The notification sequence number within the source object. It's a serial number 0N/A * identifying a particular instance of notification in the context of the notification source. 0N/A * The notification model does not assume that notifications will be received in the same order 0N/A * that they are sent. The sequence number helps listeners to sort received notifications. 0N/A * @see #setSequenceNumber 0N/A * Set the notification sequence number. 0N/A * @param sequenceNumber The notification sequence number within the source object. It is 0N/A * a serial number identifying a particular instance of notification in the 0N/A * context of the notification source. 0N/A * @see #getSequenceNumber 0N/A * Get the notification type. 699N/A * @return The notification type. It's a string expressed in a dot notation 699N/A * similar to Java properties. It is recommended that the notification type 699N/A * should follow the reverse-domain-name convention used by Java package 699N/A * names. An example of a notification type is com.example.alarm.router. 0N/A * Get the notification timestamp. 0N/A * @return The notification timestamp. 0N/A * @see #setTimeStamp 0N/A * Set the notification timestamp. 0N/A * @param timeStamp The notification timestamp. It indicates when the notification was generated. 0N/A * @see #getTimeStamp 0N/A * Get the notification message. 699N/A * @return The message string of this notification object. 0N/A * Get the user data. 0N/A * @return The user data object. It is used for whatever data 0N/A * the notification source wishes to communicate to its consumers. 0N/A * Set the user data. 0N/A * @param userData The user data object. It is used for whatever data 0N/A * the notification source wishes to communicate to its consumers. 0N/A * Returns a String representation of this notification. 0N/A * @return A String representation of this notification. 0N/A * Deserializes a {@link Notification} from an {@link ObjectInputStream}. 0N/A // New serial form ignores extra field "sourceObjectName" 0N/A * Serializes a {@link Notification} to an {@link ObjectOutputStream}. 0N/A // Serializes this instance in the old serial form 0N/A // Serializes this instance in the new serial form