2362N/A * Copyright (c) 2000, 2006, 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 * A RoleInfo object summarises a role in a relation type. 0N/A * <p>The <b>serialVersionUID</b> of this class is <code>2504952983494636987L</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 name String Role name 0N/A * @serialField isReadable boolean Read access mode: <code>true</code> if role is readable 0N/A * @serialField isWritable boolean Write access mode: <code>true</code> if role is writable 0N/A * @serialField description String Role description 0N/A * @serialField minDegree int Minimum degree (i.e. minimum number of referenced MBeans in corresponding role) 0N/A * @serialField maxDegree int Maximum degree (i.e. maximum number of referenced MBeans in corresponding role) 0N/A * @serialField referencedMBeanClassName String Name of class of MBean(s) expected to be referenced in corresponding role 0N/A // OK : Too bad, no compat with 1.0 0N/A // END Serialization compatibility stuff 0N/A * To specify an unlimited cardinality. 0N/A * @serial Read access mode: <code>true</code> if role is readable 0N/A * @serial Write access mode: <code>true</code> if role is writable 0N/A * @serial Role description 0N/A * @serial Minimum degree (i.e. minimum number of referenced MBeans in corresponding role) 0N/A * @serial Maximum degree (i.e. maximum number of referenced MBeans in corresponding role) 0N/A * @serial Name of class of MBean(s) expected to be referenced in corresponding role 0N/A * @param roleName name of the role. 0N/A * @param mbeanClassName name of the class of MBean(s) expected to 0N/A * be referenced in corresponding role. If an MBean <em>M</em> is in 0N/A * this role, then the MBean server must return true for 0N/A * {@link MBeanServer#isInstanceOf isInstanceOf(M, mbeanClassName)}. 0N/A * @param read flag to indicate if the corresponding role 0N/A * @param write flag to indicate if the corresponding role 0N/A * @param min minimum degree for role, i.e. minimum number of 0N/A * MBeans to provide in corresponding role 0N/A * Must be less than or equal to <tt>max</tt>. 0N/A * (ROLE_CARDINALITY_INFINITY for unlimited) 0N/A * @param max maximum degree for role, i.e. maximum number of 0N/A * MBeans to provide in corresponding role 0N/A * Must be greater than or equal to <tt>min</tt> 0N/A * (ROLE_CARDINALITY_INFINITY for unlimited) 0N/A * @param descr description of the role (can be null) 0N/A * @exception IllegalArgumentException if null parameter 0N/A * @exception InvalidRoleInfoException if the minimum degree is 0N/A * greater than the maximum degree. 0N/A * @exception ClassNotFoundException As of JMX 1.2, this exception 0N/A * can no longer be thrown. It is retained in the declaration of 0N/A * this class for compatibility with existing code. 0N/A * @exception NotCompliantMBeanException if the class mbeanClassName 0N/A * is not a MBean class. 0N/A * @param roleName name of the role 0N/A * @param mbeanClassName name of the class of MBean(s) expected to 0N/A * be referenced in corresponding role. If an MBean <em>M</em> is in 0N/A * this role, then the MBean server must return true for 0N/A * {@link MBeanServer#isInstanceOf isInstanceOf(M, mbeanClassName)}. 0N/A * @param read flag to indicate if the corresponding role 0N/A * @param write flag to indicate if the corresponding role 0N/A * <P>Minimum and maximum degrees defaulted to 1. 0N/A * <P>Description of role defaulted to null. 0N/A * @exception IllegalArgumentException if null parameter 0N/A * @exception ClassNotFoundException As of JMX 1.2, this exception 0N/A * can no longer be thrown. It is retained in the declaration of 0N/A * this class for compatibility with existing code. 0N/A * @exception NotCompliantMBeanException As of JMX 1.2, this 0N/A * exception can no longer be thrown. It is retained in the 0N/A * declaration of this class for compatibility with existing code. 0N/A // OK : Can never happen as the minimum 0N/A // degree equals the maximum degree. 0N/A * @param roleName name of the role 0N/A * @param mbeanClassName name of the class of MBean(s) expected to 0N/A * be referenced in corresponding role. If an MBean <em>M</em> is in 0N/A * this role, then the MBean server must return true for 0N/A * {@link MBeanServer#isInstanceOf isInstanceOf(M, mbeanClassName)}. 0N/A * <P>IsReadable and IsWritable defaulted to true. 0N/A * <P>Minimum and maximum degrees defaulted to 1. 0N/A * <P>Description of role defaulted to null. 0N/A * @exception IllegalArgumentException if null parameter 0N/A * @exception ClassNotFoundException As of JMX 1.2, this exception 0N/A * can no longer be thrown. It is retained in the declaration of 0N/A * this class for compatibility with existing code. 0N/A * @exception NotCompliantMBeanException As of JMX 1.2, this 0N/A * exception can no longer be thrown. It is retained in the 0N/A * declaration of this class for compatibility with existing code. 0N/A // OK : Can never happen as the minimum 0N/A // degree equals the maximum degree. 0N/A * @param roleInfo the <tt>RoleInfo</tt> instance to be copied. 0N/A * @exception IllegalArgumentException if null parameter 0N/A // Revisit [cebro] Localize message 0N/A // OK : Can never happen as the minimum degree and the maximum 0N/A // degree were already checked at the time the roleInfo 0N/A // instance was created. 0N/A * Returns the name of the role. 0N/A * @return the name of the role. 0N/A * Returns read access mode for the role (true if it is readable). 0N/A * @return true if the role is readable. 0N/A * Returns write access mode for the role (true if it is writable). 0N/A * @return true if the role is writable. 0N/A * Returns description text for the role. 0N/A * @return the description of the role. 0N/A * Returns minimum degree for corresponding role reference. 0N/A * @return the minimum degree. 0N/A * Returns maximum degree for corresponding role reference. 0N/A * @return the maximum degree. 0N/A * <p>Returns name of type of MBean expected to be referenced in 0N/A * corresponding role.</p> 0N/A * @return the name of the referenced type. 0N/A * Returns true if the <tt>value</tt> parameter is greater than or equal to 0N/A * the expected minimum degree, false otherwise. 0N/A * @param value the value to be checked 0N/A * @return true if greater than or equal to minimum degree, false otherwise. 0N/A * Returns true if the <tt>value</tt> parameter is lower than or equal to 0N/A * the expected maximum degree, false otherwise. 0N/A * @param value the value to be checked 0N/A * @return true if lower than or equal to maximum degree, false otherwise. 0N/A * Returns a string describing the role info. 0N/A * @return a description of the role info. 0N/A // Revisit [cebro] Localize message 0N/A // Revisit [cebro] Localize message 0N/A // Revisit [cebro] Localize message 0N/A excMsgStrB.
append(
"Minimum or maximum degree has an illegal value, must be [0, ROLE_CARDINALITY_INFINITY].");
0N/A * Deserializes a {@link RoleInfo} from an {@link ObjectInputStream}. 0N/A // Read an object serialized in the old serial form 0N/A // Read an object serialized in the new serial form 0N/A * Serializes a {@link RoleInfo} to an {@link ObjectOutputStream}. 0N/A // Serializes this instance in the old serial form 0N/A // Serializes this instance in the new serial form