2362N/A * Copyright (c) 2000, 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 * Copyright IBM Corp. 1999-2000. All rights reserved. 689N/A * <p>The ModelMBeanNotificationInfo object describes a notification emitted 0N/A * It is a subclass of MBeanNotificationInfo with the addition of an 689N/A * associated Descriptor and an implementation of the Descriptor interface.</p> 689N/A * The fields in the descriptor are defined, but not limited to, the following. 689N/A * Note that when the Type in this table is Number, a String that is the decimal 689N/A * representation of a Long can also be used.</P> 689N/A * <table border="1" cellpadding="5"> 689N/A * <tr><th>Name</th><th>Type</th><th>Meaning</th></tr> 689N/A * <tr><td>name</td><td>String</td> 689N/A * <td>Notification name.</td></tr> 689N/A * <tr><td>descriptorType</td><td>String</td> 689N/A * <td>Must be "notification".</td></tr> 689N/A * <tr><td>severity</td><td>Number</td> 689N/A * <td>0-6 where 0: unknown; 1: non-recoverable; 689N/A * 2: critical, failure; 3: major, severe; 689N/A * 4: minor, marginal, error; 5: warning; 689N/A * 6: normal, cleared, informative</td></tr> 689N/A * <tr><td>messageID</td><td>String</td> 689N/A * <td>Unique key for message text (to allow translation, analysis).</td></tr> 689N/A * <tr><td>messageText</td><td>String</td> 689N/A * <td>Text of notification.</td></tr> 689N/A * <tr><td>log</td><td>String</td> 689N/A * <td>T - log message, F - do not log message.</td></tr> 689N/A * <tr><td>logfile</td><td>String</td> 689N/A * <td>fully qualified file name appropriate for operating system.</td></tr> 689N/A * <tr><td>visibility</td><td>Number</td> 689N/A * <td>1-4 where 1: always visible 4: rarely visible.</td></tr> 689N/A * <tr><td>presentationString</td><td>String</td> 689N/A * <td>XML formatted string to allow presentation of data.</td></tr> 689N/A * <p>The default descriptor contains the name, descriptorType, 0N/A * displayName and severity(=6) fields. The default value of the name 0N/A * and displayName fields is the name of the Notification class (as 0N/A * specified by the <code>name</code> parameter of the 689N/A * ModelMBeanNotificationInfo constructor).</p> 0N/A * <p>The <b>serialVersionUID</b> of this class is <code>-7445681389570207141L</code>. 0N/A // Serialization compatibility stuff: 0N/A // Two serial forms are supported in this class. The selected form 0N/A // depends 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 notificationDescriptor Descriptor The descriptor 0N/A * containing the appropriate metadata for this instance 0N/A // OK: No compat with 1.0 0N/A // END Serialization compatibility stuff 0N/A * @serial The descriptor containing the appropriate metadata for 0N/A * Constructs a ModelMBeanNotificationInfo object with a default 0N/A * @param notifTypes The array of strings (in dot notation) containing 0N/A * the notification types that may be emitted. 0N/A * @param name The name of the Notification class. 0N/A * @param description A human readable description of the 0N/A * Notification. Optional. 0N/A * Constructs a ModelMBeanNotificationInfo object. 0N/A * @param notifTypes The array of strings (in dot notation) 0N/A * containing the notification types that may be emitted. 0N/A * @param name The name of the Notification class. 0N/A * @param description A human readable description of the Notification. 0N/A * @param descriptor An instance of Descriptor containing the 0N/A * appropriate metadata for this instance of the 0N/A * MBeanNotificationInfo. If it is null a default descriptor 1790N/A * will be created. If the descriptor does not contain the 1790N/A * fields "displayName" or "severity", 0N/A * the missing ones are added with their default values. 0N/A * @exception RuntimeOperationsException Wraps an 0N/A * {@link IllegalArgumentException}. The descriptor is invalid, or 1790N/A * descriptor field "name" is not equal to parameter name, or 1790N/A * descriptor field "descriptorType" is not equal to "notification". 0N/A "ModelMBeanNotificationInfo",
"Entry");
0N/A * Constructs a new ModelMBeanNotificationInfo object from this 0N/A * ModelMBeanNotfication Object. 0N/A * @param inInfo the ModelMBeanNotificationInfo to be duplicated 0N/A * Creates and returns a new ModelMBeanNotificationInfo which is a 0N/A * duplicate of this ModelMBeanNotificationInfo. 0N/A "clone()",
"Entry");
0N/A * Returns a copy of the associated Descriptor for the 0N/A * ModelMBeanNotificationInfo. 0N/A * @return Descriptor associated with the 0N/A * ModelMBeanNotificationInfo object. 0N/A * @see #setDescriptor 0N/A "getDescriptor()",
"Entry");
0N/A // Dead code. Should never happen. 0N/A "getDescriptor()",
"Descriptor value is null, " +
0N/A "setting descriptor to default values");
0N/A * Sets associated Descriptor (full replace) for the 0N/A * ModelMBeanNotificationInfo If the new Descriptor is null, 0N/A * then the associated Descriptor reverts to a default 0N/A * descriptor. The Descriptor is validated before it is 0N/A * assigned. If the new Descriptor is invalid, then a 0N/A * RuntimeOperationsException wrapping an 0N/A * IllegalArgumentException is thrown. 0N/A * @param inDescriptor replaces the Descriptor associated with the 0N/A * ModelMBeanNotification interface 0N/A * @exception RuntimeOperationsException Wraps an 0N/A * {@link IllegalArgumentException} for invalid Descriptor. 0N/A * @see #getDescriptor 0N/A "setDescriptor(Descriptor)",
"Entry");
0N/A * Returns a human readable string containing 0N/A * ModelMBeanNotificationInfo. 0N/A * @return a string describing this object. 0N/A "toString()",
"Entry");
0N/A * Clones the passed in Descriptor, sets default values, and checks for validity. 0N/A * If the Descriptor is invalid (for instance by having the wrong "name"), 0N/A * this indicates programming error and a RuntimeOperationsException will be thrown. 0N/A * The following fields will be defaulted if they are not already set: 0N/A * descriptorType="notification",displayName=this.getName(), 0N/A * name=this.getName(),severity="6" 0N/A * @param in Descriptor to be checked, or null which is equivalent to an 0N/A * @exception RuntimeOperationsException if Descriptor is invalid 0N/A "The isValid() method of the Descriptor object itself returned false,"+
0N/A "The Descriptor \"name\" field does not match the object described. " +
0N/A "The Descriptor \"descriptorType\" field does not match the object described. " +
0N/A * Deserializes a {@link ModelMBeanNotificationInfo} from an 0N/A * {@link ObjectInputStream}. 0N/A // New serial form ignores extra field "currClass" 0N/A * Serializes a {@link ModelMBeanNotificationInfo} to an 0N/A * {@link ObjectOutputStream}. 0N/A // Serializes this instance in the old serial form 0N/A // Serializes this instance in the new serial form