jdk/src/share/classes/javax/management/modelmbean/ModelMBeanNotificationInfo.java
author rriggs
Tue, 12 Nov 2013 14:03:28 -0500
changeset 21656 d4c777ccb1db
parent 7038 fd9c0e3b34eb
child 23010 6dadb192ad81
permissions -rw-r--r--
8028014: Doclint warning/error cleanup in javax.management Summary: Improve generated html by fixing doclint warnings Reviewed-by: sla, jbachorik
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4156
diff changeset
     2
 * Copyright (c) 2000, 2008, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4156
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4156
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4156
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4156
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4156
diff changeset
    23
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
/*
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
 * @author    IBM Corp.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
 * Copyright IBM Corp. 1999-2000.  All rights reserved.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
package javax.management.modelmbean;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
import static com.sun.jmx.defaults.JmxProperties.MODELMBEAN_LOGGER;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
import com.sun.jmx.mbeanserver.GetPropertyAction;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
import java.io.IOException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
import java.io.ObjectInputStream;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
import java.io.ObjectOutputStream;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
import java.io.ObjectStreamField;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
import java.security.AccessController;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
import java.util.logging.Level;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
import javax.management.Descriptor;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
import javax.management.DescriptorAccess;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
import javax.management.MBeanNotificationInfo;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
import javax.management.RuntimeOperationsException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
/**
1513
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 715
diff changeset
    49
 * <p>The ModelMBeanNotificationInfo object describes a notification emitted
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
 * by a ModelMBean.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
 * It is a subclass of MBeanNotificationInfo with the addition of an
1513
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 715
diff changeset
    52
 * associated Descriptor and an implementation of the Descriptor interface.</p>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 715
diff changeset
    53
 *
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 715
diff changeset
    54
 * <P id="descriptor">
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 715
diff changeset
    55
 * The fields in the descriptor are defined, but not limited to, the following.
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 715
diff changeset
    56
 * Note that when the Type in this table is Number, a String that is the decimal
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 715
diff changeset
    57
 * representation of a Long can also be used.</P>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 715
diff changeset
    58
 *
21656
d4c777ccb1db 8028014: Doclint warning/error cleanup in javax.management
rriggs
parents: 7038
diff changeset
    59
 * <table border="1" cellpadding="5" summary="ModelMBeanNotificationInfo Fields">
1513
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 715
diff changeset
    60
 * <tr><th>Name</th><th>Type</th><th>Meaning</th></tr>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 715
diff changeset
    61
 * <tr><td>name</td><td>String</td>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 715
diff changeset
    62
 *     <td>Notification name.</td></tr>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 715
diff changeset
    63
 * <tr><td>descriptorType</td><td>String</td>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 715
diff changeset
    64
 *     <td>Must be "notification".</td></tr>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 715
diff changeset
    65
 * <tr><td>severity</td><td>Number</td>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 715
diff changeset
    66
 *     <td>0-6 where 0: unknown; 1: non-recoverable;
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 715
diff changeset
    67
 *         2: critical, failure; 3: major, severe;
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 715
diff changeset
    68
 *         4: minor, marginal, error; 5: warning;
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 715
diff changeset
    69
 *         6: normal, cleared, informative</td></tr>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 715
diff changeset
    70
 * <tr><td>messageID</td><td>String</td>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 715
diff changeset
    71
 *     <td>Unique key for message text (to allow translation, analysis).</td></tr>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 715
diff changeset
    72
 * <tr><td>messageText</td><td>String</td>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 715
diff changeset
    73
 *     <td>Text of notification.</td></tr>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 715
diff changeset
    74
 * <tr><td>log</td><td>String</td>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 715
diff changeset
    75
 *     <td>T - log message, F - do not log message.</td></tr>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 715
diff changeset
    76
 * <tr><td>logfile</td><td>String</td>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 715
diff changeset
    77
 *     <td>fully qualified file name appropriate for operating system.</td></tr>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 715
diff changeset
    78
 * <tr><td>visibility</td><td>Number</td>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 715
diff changeset
    79
 *     <td>1-4 where 1: always visible 4: rarely visible.</td></tr>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 715
diff changeset
    80
 * <tr><td>presentationString</td><td>String</td>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 715
diff changeset
    81
 *     <td>XML formatted string to allow presentation of data.</td></tr>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 715
diff changeset
    82
 * </table>
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 715
diff changeset
    83
 *
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 715
diff changeset
    84
 * <p>The default descriptor contains the name, descriptorType,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
 * displayName and severity(=6) fields.  The default value of the name
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
 * and displayName fields is the name of the Notification class (as
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
 * specified by the <code>name</code> parameter of the
1513
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 715
diff changeset
    88
 * ModelMBeanNotificationInfo constructor).</p>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
 * <p>The <b>serialVersionUID</b> of this class is <code>-7445681389570207141L</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
 * @since 1.5
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
@SuppressWarnings("serial")  // serialVersionUID is not constant
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
public class ModelMBeanNotificationInfo
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
    extends MBeanNotificationInfo
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
    implements DescriptorAccess {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
    // Serialization compatibility stuff:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
    // Two serial forms are supported in this class. The selected form
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
    // depends on system property "jmx.serial.form":
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
    //  - "1.0" for JMX 1.0
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
    //  - any other value for JMX 1.1 and higher
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
    //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
    // Serial version for old serial form
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
    private static final long oldSerialVersionUID = -5211564525059047097L;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
    //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
    // Serial version for new serial form
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
    private static final long newSerialVersionUID = -7445681389570207141L;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
    //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
    // Serializable fields in old serial form
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
    private static final ObjectStreamField[] oldSerialPersistentFields =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
    {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
      new ObjectStreamField("notificationDescriptor", Descriptor.class),
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
      new ObjectStreamField("currClass", String.class)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
    };
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
    //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
    // Serializable fields in new serial form
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
    private static final ObjectStreamField[] newSerialPersistentFields =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
    {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
      new ObjectStreamField("notificationDescriptor", Descriptor.class)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
    };
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
    //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
    // Actual serial version and serial form
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
    private static final long serialVersionUID;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
     * @serialField notificationDescriptor Descriptor The descriptor
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
     *   containing the appropriate metadata for this instance
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
    private static final ObjectStreamField[] serialPersistentFields;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
    private static boolean compat = false;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
    static {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
        try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
            GetPropertyAction act = new GetPropertyAction("jmx.serial.form");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
            String form = AccessController.doPrivileged(act);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
            compat = (form != null && form.equals("1.0"));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
        } catch (Exception e) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
            // OK: No compat with 1.0
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
        if (compat) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
            serialPersistentFields = oldSerialPersistentFields;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
            serialVersionUID = oldSerialVersionUID;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
        } else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
            serialPersistentFields = newSerialPersistentFields;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
            serialVersionUID = newSerialVersionUID;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
    //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
    // END Serialization compatibility stuff
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
     * @serial The descriptor containing the appropriate metadata for
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
     *         this instance
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
    private Descriptor notificationDescriptor;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
    private static final String currClass = "ModelMBeanNotificationInfo";
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
     * Constructs a ModelMBeanNotificationInfo object with a default
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
     * descriptor.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
     * @param notifTypes The array of strings (in dot notation) containing
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
     *     the notification types that may be emitted.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
     * @param name The name of the Notification class.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
     * @param description A human readable description of the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
     *     Notification. Optional.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
     **/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
    public ModelMBeanNotificationInfo(String[] notifTypes,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
                                      String name,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
                                      String description) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
        this(notifTypes,name,description,null);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
     * Constructs a ModelMBeanNotificationInfo object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
     * @param notifTypes The array of strings (in dot notation)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
     *        containing the notification types that may be emitted.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
     * @param name The name of the Notification class.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
     * @param description A human readable description of the Notification.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
     *        Optional.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
     * @param descriptor An instance of Descriptor containing the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
     *        appropriate metadata for this instance of the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
     *        MBeanNotificationInfo. If it is null a default descriptor
4156
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1513
diff changeset
   187
     *        will be created. If the descriptor does not contain the
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1513
diff changeset
   188
     *        fields "displayName" or "severity",
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
     *        the missing ones are added with their default values.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
     * @exception RuntimeOperationsException Wraps an
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
     *    {@link IllegalArgumentException}. The descriptor is invalid, or
4156
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1513
diff changeset
   193
     *    descriptor field "name" is not equal to parameter name, or
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1513
diff changeset
   194
     *    descriptor field "descriptorType" is not equal to "notification".
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
     **/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
    public ModelMBeanNotificationInfo(String[] notifTypes,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
                                      String name,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
                                      String description,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
                                      Descriptor descriptor) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
        super(notifTypes, name, description);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
        if (MODELMBEAN_LOGGER.isLoggable(Level.FINER)) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
            MODELMBEAN_LOGGER.logp(Level.FINER,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
                    ModelMBeanNotificationInfo.class.getName(),
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
                    "ModelMBeanNotificationInfo", "Entry");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
        notificationDescriptor = validDescriptor(descriptor);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
     * Constructs a new ModelMBeanNotificationInfo object from this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
     * ModelMBeanNotfication Object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
     * @param inInfo the ModelMBeanNotificationInfo to be duplicated
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
     **/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
    public ModelMBeanNotificationInfo(ModelMBeanNotificationInfo inInfo) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
        this(inInfo.getNotifTypes(),
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
             inInfo.getName(),
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
             inInfo.getDescription(),inInfo.getDescriptor());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
     * Creates and returns a new ModelMBeanNotificationInfo which is a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
     * duplicate of this ModelMBeanNotificationInfo.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
     **/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
    public Object clone () {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
        if (MODELMBEAN_LOGGER.isLoggable(Level.FINER)) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
            MODELMBEAN_LOGGER.logp(Level.FINER,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
                    ModelMBeanNotificationInfo.class.getName(),
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
                    "clone()", "Entry");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
        return(new ModelMBeanNotificationInfo(this));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
     * Returns a copy of the associated Descriptor for the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
     * ModelMBeanNotificationInfo.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
     * @return Descriptor associated with the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
     * ModelMBeanNotificationInfo object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
     * @see #setDescriptor
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
     **/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245
    public Descriptor getDescriptor() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
        if (MODELMBEAN_LOGGER.isLoggable(Level.FINER)) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
            MODELMBEAN_LOGGER.logp(Level.FINER,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
                    ModelMBeanNotificationInfo.class.getName(),
90ce3da70b43 Initial load
duke
parents:
diff changeset
   249
                    "getDescriptor()", "Entry");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   250
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   251
90ce3da70b43 Initial load
duke
parents:
diff changeset
   252
        if (notificationDescriptor == null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   253
            // Dead code. Should never happen.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   254
            if (MODELMBEAN_LOGGER.isLoggable(Level.FINER)) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   255
                MODELMBEAN_LOGGER.logp(Level.FINER,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   256
                        ModelMBeanNotificationInfo.class.getName(),
90ce3da70b43 Initial load
duke
parents:
diff changeset
   257
                        "getDescriptor()", "Descriptor value is null, " +
90ce3da70b43 Initial load
duke
parents:
diff changeset
   258
                        "setting descriptor to default values");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   259
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   260
            notificationDescriptor = validDescriptor(null);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   261
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   262
90ce3da70b43 Initial load
duke
parents:
diff changeset
   263
        return((Descriptor)notificationDescriptor.clone());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   264
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   265
90ce3da70b43 Initial load
duke
parents:
diff changeset
   266
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   267
     * Sets associated Descriptor (full replace) for the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   268
     * ModelMBeanNotificationInfo If the new Descriptor is null,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   269
     * then the associated Descriptor reverts to a default
90ce3da70b43 Initial load
duke
parents:
diff changeset
   270
     * descriptor.  The Descriptor is validated before it is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   271
     * assigned.  If the new Descriptor is invalid, then a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   272
     * RuntimeOperationsException wrapping an
90ce3da70b43 Initial load
duke
parents:
diff changeset
   273
     * IllegalArgumentException is thrown.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   274
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   275
     * @param inDescriptor replaces the Descriptor associated with the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   276
     * ModelMBeanNotification interface
90ce3da70b43 Initial load
duke
parents:
diff changeset
   277
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   278
     * @exception RuntimeOperationsException Wraps an
90ce3da70b43 Initial load
duke
parents:
diff changeset
   279
     * {@link IllegalArgumentException} for invalid Descriptor.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   280
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   281
     * @see #getDescriptor
90ce3da70b43 Initial load
duke
parents:
diff changeset
   282
     **/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   283
    public void setDescriptor(Descriptor inDescriptor) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   284
        if (MODELMBEAN_LOGGER.isLoggable(Level.FINER)) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   285
            MODELMBEAN_LOGGER.logp(Level.FINER,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   286
                    ModelMBeanNotificationInfo.class.getName(),
90ce3da70b43 Initial load
duke
parents:
diff changeset
   287
                    "setDescriptor(Descriptor)", "Entry");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   288
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   289
        notificationDescriptor = validDescriptor(inDescriptor);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   290
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   291
90ce3da70b43 Initial load
duke
parents:
diff changeset
   292
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   293
     * Returns a human readable string containing
90ce3da70b43 Initial load
duke
parents:
diff changeset
   294
     * ModelMBeanNotificationInfo.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   295
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   296
     * @return a string describing this object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   297
     **/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   298
    public String toString() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   299
        if (MODELMBEAN_LOGGER.isLoggable(Level.FINER)) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   300
            MODELMBEAN_LOGGER.logp(Level.FINER,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   301
                    ModelMBeanNotificationInfo.class.getName(),
90ce3da70b43 Initial load
duke
parents:
diff changeset
   302
                    "toString()", "Entry");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   303
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   304
90ce3da70b43 Initial load
duke
parents:
diff changeset
   305
        final StringBuilder retStr = new StringBuilder();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   306
90ce3da70b43 Initial load
duke
parents:
diff changeset
   307
        retStr.append("ModelMBeanNotificationInfo: ")
90ce3da70b43 Initial load
duke
parents:
diff changeset
   308
            .append(this.getName());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   309
90ce3da70b43 Initial load
duke
parents:
diff changeset
   310
        retStr.append(" ; Description: ")
90ce3da70b43 Initial load
duke
parents:
diff changeset
   311
            .append(this.getDescription());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   312
90ce3da70b43 Initial load
duke
parents:
diff changeset
   313
        retStr.append(" ; Descriptor: ")
90ce3da70b43 Initial load
duke
parents:
diff changeset
   314
            .append(this.getDescriptor());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   315
90ce3da70b43 Initial load
duke
parents:
diff changeset
   316
        retStr.append(" ; Types: ");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   317
        String[] nTypes = this.getNotifTypes();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   318
        for (int i=0; i < nTypes.length; i++) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   319
            if (i > 0) retStr.append(", ");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   320
            retStr.append(nTypes[i]);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   321
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   322
        return retStr.toString();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   323
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   324
90ce3da70b43 Initial load
duke
parents:
diff changeset
   325
90ce3da70b43 Initial load
duke
parents:
diff changeset
   326
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   327
     * Clones the passed in Descriptor, sets default values, and checks for validity.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   328
     * If the Descriptor is invalid (for instance by having the wrong "name"),
90ce3da70b43 Initial load
duke
parents:
diff changeset
   329
     * this indicates programming error and a RuntimeOperationsException will be thrown.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   330
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   331
     * The following fields will be defaulted if they are not already set:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   332
     * descriptorType="notification",displayName=this.getName(),
90ce3da70b43 Initial load
duke
parents:
diff changeset
   333
     * name=this.getName(),severity="6"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   334
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   335
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   336
     * @param in Descriptor to be checked, or null which is equivalent to an
90ce3da70b43 Initial load
duke
parents:
diff changeset
   337
     * empty Descriptor.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   338
     * @exception RuntimeOperationsException if Descriptor is invalid
90ce3da70b43 Initial load
duke
parents:
diff changeset
   339
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   340
    private Descriptor validDescriptor(final Descriptor in) throws RuntimeOperationsException {
526
61ba2d5ea9da 6701459: Synchronization bug pattern found in javax.management.relation.RelationService
emcmanus
parents: 2
diff changeset
   341
        Descriptor clone;
4156
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1513
diff changeset
   342
        boolean defaulted = (in == null);
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1513
diff changeset
   343
        if (defaulted) {
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   344
            clone = new DescriptorSupport();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   345
            MODELMBEAN_LOGGER.finer("Null Descriptor, creating new.");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   346
        } else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   347
            clone = (Descriptor) in.clone();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   348
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   349
90ce3da70b43 Initial load
duke
parents:
diff changeset
   350
        //Setting defaults.
4156
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1513
diff changeset
   351
        if (defaulted && clone.getFieldValue("name")==null) {
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   352
            clone.setField("name", this.getName());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   353
            MODELMBEAN_LOGGER.finer("Defaulting Descriptor name to " + this.getName());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   354
        }
4156
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1513
diff changeset
   355
        if (defaulted && clone.getFieldValue("descriptorType")==null) {
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   356
            clone.setField("descriptorType", "notification");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   357
            MODELMBEAN_LOGGER.finer("Defaulting descriptorType to \"notification\"");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   358
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   359
        if (clone.getFieldValue("displayName") == null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   360
            clone.setField("displayName",this.getName());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   361
            MODELMBEAN_LOGGER.finer("Defaulting Descriptor displayName to " + this.getName());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   362
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   363
        if (clone.getFieldValue("severity") == null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   364
            clone.setField("severity", "6");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   365
            MODELMBEAN_LOGGER.finer("Defaulting Descriptor severity field to 6");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   366
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   367
90ce3da70b43 Initial load
duke
parents:
diff changeset
   368
        //Checking validity
90ce3da70b43 Initial load
duke
parents:
diff changeset
   369
        if (!clone.isValid()) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   370
             throw new RuntimeOperationsException(new IllegalArgumentException("Invalid Descriptor argument"),
90ce3da70b43 Initial load
duke
parents:
diff changeset
   371
                "The isValid() method of the Descriptor object itself returned false,"+
90ce3da70b43 Initial load
duke
parents:
diff changeset
   372
                "one or more required fields are invalid. Descriptor:" + clone.toString());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   373
        }
4156
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1513
diff changeset
   374
        if (!getName().equalsIgnoreCase((String) clone.getFieldValue("name"))) {
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   375
                throw new RuntimeOperationsException(new IllegalArgumentException("Invalid Descriptor argument"),
90ce3da70b43 Initial load
duke
parents:
diff changeset
   376
                "The Descriptor \"name\" field does not match the object described. " +
90ce3da70b43 Initial load
duke
parents:
diff changeset
   377
                 " Expected: "+ this.getName() + " , was: " + clone.getFieldValue("name"));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   378
        }
4156
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1513
diff changeset
   379
        if (!"notification".equalsIgnoreCase((String) clone.getFieldValue("descriptorType"))) {
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   380
                 throw new RuntimeOperationsException(new IllegalArgumentException("Invalid Descriptor argument"),
90ce3da70b43 Initial load
duke
parents:
diff changeset
   381
                "The Descriptor \"descriptorType\" field does not match the object described. " +
90ce3da70b43 Initial load
duke
parents:
diff changeset
   382
                 " Expected: \"notification\" ," + " was: " + clone.getFieldValue("descriptorType"));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   383
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   384
90ce3da70b43 Initial load
duke
parents:
diff changeset
   385
        return clone;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   386
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   387
90ce3da70b43 Initial load
duke
parents:
diff changeset
   388
90ce3da70b43 Initial load
duke
parents:
diff changeset
   389
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   390
     * Deserializes a {@link ModelMBeanNotificationInfo} from an
90ce3da70b43 Initial load
duke
parents:
diff changeset
   391
     * {@link ObjectInputStream}.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   392
     **/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   393
    private void readObject(ObjectInputStream in)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   394
        throws IOException, ClassNotFoundException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   395
        // New serial form ignores extra field "currClass"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   396
        in.defaultReadObject();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   397
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   398
90ce3da70b43 Initial load
duke
parents:
diff changeset
   399
90ce3da70b43 Initial load
duke
parents:
diff changeset
   400
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   401
     * Serializes a {@link ModelMBeanNotificationInfo} to an
90ce3da70b43 Initial load
duke
parents:
diff changeset
   402
     * {@link ObjectOutputStream}.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   403
     **/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   404
    private void writeObject(ObjectOutputStream out)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   405
        throws IOException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   406
        if (compat) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   407
            // Serializes this instance in the old serial form
90ce3da70b43 Initial load
duke
parents:
diff changeset
   408
            //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   409
            ObjectOutputStream.PutField fields = out.putFields();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   410
            fields.put("notificationDescriptor", notificationDescriptor);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   411
            fields.put("currClass", currClass);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   412
            out.writeFields();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   413
        } else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   414
            // Serializes this instance in the new serial form
90ce3da70b43 Initial load
duke
parents:
diff changeset
   415
            //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   416
            out.defaultWriteObject();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   417
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   418
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   419
90ce3da70b43 Initial load
duke
parents:
diff changeset
   420
}