< prev index next >

src/java.management/share/classes/javax/management/MBeanInfo.java

Print this page

        

*** 55,70 **** * provides a conventional way for clients of the MBean to discover the change. * See also the <a href="Descriptor.html#immutableInfo">immutableInfo</a> and * <a href="Descriptor.html#infoTimeout">infoTimeout</a> fields in the {@code * MBeanInfo} {@link Descriptor}.</p> * ! * <p>The contents of the <code>MBeanInfo</code> for a Dynamic MBean * are determined by its {@link DynamicMBean#getMBeanInfo * getMBeanInfo()} method. This includes Open MBeans and Model * MBeans, which are kinds of Dynamic MBeans.</p> * ! * <p>The contents of the <code>MBeanInfo</code> for a Standard MBean * are determined by the MBean server as follows:</p> * * <ul> * * <li>{@link #getClassName()} returns the Java class name of the MBean --- 55,70 ---- * provides a conventional way for clients of the MBean to discover the change. * See also the <a href="Descriptor.html#immutableInfo">immutableInfo</a> and * <a href="Descriptor.html#infoTimeout">infoTimeout</a> fields in the {@code * MBeanInfo} {@link Descriptor}.</p> * ! * <p>The contents of the {@code MBeanInfo} for a Dynamic MBean * are determined by its {@link DynamicMBean#getMBeanInfo * getMBeanInfo()} method. This includes Open MBeans and Model * MBeans, which are kinds of Dynamic MBeans.</p> * ! * <p>The contents of the {@code MBeanInfo} for a Standard MBean * are determined by the MBean server as follows:</p> * * <ul> * * <li>{@link #getClassName()} returns the Java class name of the MBean
*** 94,104 **** * </ul> * * <p>The description returned by {@link #getDescription()} and the * descriptions of the contained attributes and operations are not specified.</p> * ! * <p>The remaining details of the <code>MBeanInfo</code> for a * Standard MBean are not specified. This includes the description of * any contained constructors, and notifications; the names * of parameters to constructors and operations; and the descriptions of * constructor parameters.</p> * --- 94,104 ---- * </ul> * * <p>The description returned by {@link #getDescription()} and the * descriptions of the contained attributes and operations are not specified.</p> * ! * <p>The remaining details of the {@code MBeanInfo} for a * Standard MBean are not specified. This includes the description of * any contained constructors, and notifications; the names * of parameters to constructors and operations; and the descriptions of * constructor parameters.</p> *
*** 159,172 **** * cannot access the corresponding array directly.</p> */ private final transient boolean arrayGettersSafe; /** ! * Constructs an <CODE>MBeanInfo</CODE>. * * @param className The name of the Java class of the MBean described ! * by this <CODE>MBeanInfo</CODE>. This value may be any * syntactically legal Java class name. It does not have to be a * Java class known to the MBean server or to the MBean's * ClassLoader. If it is a Java class known to the MBean's * ClassLoader, it is recommended but not required that the * class's public methods include those that would appear in a --- 159,172 ---- * cannot access the corresponding array directly.</p> */ private final transient boolean arrayGettersSafe; /** ! * Constructs an {@code MBeanInfo}. * * @param className The name of the Java class of the MBean described ! * by this {@code MBeanInfo}. This value may be any * syntactically legal Java class name. It does not have to be a * Java class known to the MBean server or to the MBean's * ClassLoader. If it is a Java class known to the MBean's * ClassLoader, it is recommended but not required that the * class's public methods include those that would appear in a
*** 193,206 **** this(className, description, attributes, constructors, operations, notifications, null); } /** ! * Constructs an <CODE>MBeanInfo</CODE>. * * @param className The name of the Java class of the MBean described ! * by this <CODE>MBeanInfo</CODE>. This value may be any * syntactically legal Java class name. It does not have to be a * Java class known to the MBean server or to the MBean's * ClassLoader. If it is a Java class known to the MBean's * ClassLoader, it is recommended but not required that the * class's public methods include those that would appear in a --- 193,206 ---- this(className, description, attributes, constructors, operations, notifications, null); } /** ! * Constructs an {@code MBeanInfo}. * * @param className The name of the Java class of the MBean described ! * by this {@code MBeanInfo}. This value may be any * syntactically legal Java class name. It does not have to be a * Java class known to the MBean server or to the MBean's * ClassLoader. If it is a Java class known to the MBean's * ClassLoader, it is recommended but not required that the * class's public methods include those that would appear in a
*** 258,270 **** arrayGettersSafe(this.getClass(), MBeanInfo.class); } /** * <p>Returns a shallow clone of this instance. ! * The clone is obtained by simply calling <tt>super.clone()</tt>, * thus calling the default native shallow cloning mechanism ! * implemented by <tt>Object.clone()</tt>. * No deeper cloning of any internal field is made.</p> * * <p>Since this class is immutable, the clone method is chiefly of * interest to subclasses.</p> */ --- 258,270 ---- arrayGettersSafe(this.getClass(), MBeanInfo.class); } /** * <p>Returns a shallow clone of this instance. ! * The clone is obtained by simply calling {@code super.clone()}, * thus calling the default native shallow cloning mechanism ! * implemented by {@code Object.clone()}. * No deeper cloning of any internal field is made.</p> * * <p>Since this class is immutable, the clone method is chiefly of * interest to subclasses.</p> */
*** 279,289 **** } /** * Returns the name of the Java class of the MBean described by ! * this <CODE>MBeanInfo</CODE>. * * @return the class name. */ public String getClassName() { return className; --- 279,289 ---- } /** * Returns the name of the Java class of the MBean described by ! * this {@code MBeanInfo}. * * @return the class name. */ public String getClassName() { return className;
*** 298,315 **** return description; } /** * Returns the list of attributes exposed for management. ! * Each attribute is described by an <CODE>MBeanAttributeInfo</CODE> object. * * The returned array is a shallow copy of the internal array, * which means that it is a copy of the internal array of ! * references to the <CODE>MBeanAttributeInfo</CODE> objects ! * but that each referenced <CODE>MBeanAttributeInfo</CODE> object is not copied. * ! * @return An array of <CODE>MBeanAttributeInfo</CODE> objects. */ public MBeanAttributeInfo[] getAttributes() { MBeanAttributeInfo[] as = nonNullAttributes(); if (as.length == 0) return as; --- 298,315 ---- return description; } /** * Returns the list of attributes exposed for management. ! * Each attribute is described by an {@code MBeanAttributeInfo} object. * * The returned array is a shallow copy of the internal array, * which means that it is a copy of the internal array of ! * references to the {@code MBeanAttributeInfo} objects ! * but that each referenced {@code MBeanAttributeInfo} object is not copied. * ! * @return An array of {@code MBeanAttributeInfo} objects. */ public MBeanAttributeInfo[] getAttributes() { MBeanAttributeInfo[] as = nonNullAttributes(); if (as.length == 0) return as;
*** 340,357 **** MBeanAttributeInfo.NO_ATTRIBUTES : attributes; } /** * Returns the list of operations of the MBean. ! * Each operation is described by an <CODE>MBeanOperationInfo</CODE> object. * * The returned array is a shallow copy of the internal array, * which means that it is a copy of the internal array of ! * references to the <CODE>MBeanOperationInfo</CODE> objects ! * but that each referenced <CODE>MBeanOperationInfo</CODE> object is not copied. * ! * @return An array of <CODE>MBeanOperationInfo</CODE> objects. */ public MBeanOperationInfo[] getOperations() { MBeanOperationInfo[] os = nonNullOperations(); if (os.length == 0) return os; --- 340,357 ---- MBeanAttributeInfo.NO_ATTRIBUTES : attributes; } /** * Returns the list of operations of the MBean. ! * Each operation is described by an {@code MBeanOperationInfo} object. * * The returned array is a shallow copy of the internal array, * which means that it is a copy of the internal array of ! * references to the {@code MBeanOperationInfo} objects ! * but that each referenced {@code MBeanOperationInfo} object is not copied. * ! * @return An array of {@code MBeanOperationInfo} objects. */ public MBeanOperationInfo[] getOperations() { MBeanOperationInfo[] os = nonNullOperations(); if (os.length == 0) return os;
*** 372,396 **** } /** * <p>Returns the list of the public constructors of the MBean. * Each constructor is described by an ! * <CODE>MBeanConstructorInfo</CODE> object.</p> * * <p>The returned array is a shallow copy of the internal array, * which means that it is a copy of the internal array of ! * references to the <CODE>MBeanConstructorInfo</CODE> objects but ! * that each referenced <CODE>MBeanConstructorInfo</CODE> object * is not copied.</p> * * <p>The returned list is not necessarily exhaustive. That is, * the MBean may have a public constructor that is not in the * list. In this case, the MBean server can construct another * instance of this MBean's class using that constructor, even * though it is not listed here.</p> * ! * @return An array of <CODE>MBeanConstructorInfo</CODE> objects. */ public MBeanConstructorInfo[] getConstructors() { MBeanConstructorInfo[] cs = nonNullConstructors(); if (cs.length == 0) return cs; --- 372,396 ---- } /** * <p>Returns the list of the public constructors of the MBean. * Each constructor is described by an ! * {@code MBeanConstructorInfo} object.</p> * * <p>The returned array is a shallow copy of the internal array, * which means that it is a copy of the internal array of ! * references to the {@code MBeanConstructorInfo} objects but ! * that each referenced {@code MBeanConstructorInfo} object * is not copied.</p> * * <p>The returned list is not necessarily exhaustive. That is, * the MBean may have a public constructor that is not in the * list. In this case, the MBean server can construct another * instance of this MBean's class using that constructor, even * though it is not listed here.</p> * ! * @return An array of {@code MBeanConstructorInfo} objects. */ public MBeanConstructorInfo[] getConstructors() { MBeanConstructorInfo[] cs = nonNullConstructors(); if (cs.length == 0) return cs;
*** 410,427 **** MBeanConstructorInfo.NO_CONSTRUCTORS : constructors; } /** * Returns the list of the notifications emitted by the MBean. ! * Each notification is described by an <CODE>MBeanNotificationInfo</CODE> object. * * The returned array is a shallow copy of the internal array, * which means that it is a copy of the internal array of ! * references to the <CODE>MBeanNotificationInfo</CODE> objects ! * but that each referenced <CODE>MBeanNotificationInfo</CODE> object is not copied. * ! * @return An array of <CODE>MBeanNotificationInfo</CODE> objects. */ public MBeanNotificationInfo[] getNotifications() { MBeanNotificationInfo[] ns = nonNullNotifications(); if (ns.length == 0) return ns; --- 410,427 ---- MBeanConstructorInfo.NO_CONSTRUCTORS : constructors; } /** * Returns the list of the notifications emitted by the MBean. ! * Each notification is described by an {@code MBeanNotificationInfo} object. * * The returned array is a shallow copy of the internal array, * which means that it is a copy of the internal array of ! * references to the {@code MBeanNotificationInfo} objects ! * but that each referenced {@code MBeanNotificationInfo} object is not copied. * ! * @return An array of {@code MBeanNotificationInfo} objects. */ public MBeanNotificationInfo[] getNotifications() { MBeanNotificationInfo[] ns = nonNullNotifications(); if (ns.length == 0) return ns;
*** 480,490 **** * <p>If two MBeanInfo objects return the same values in one of * their arrays but in a different order then they are not equal.</p> * * @param o the object to compare to. * ! * @return true if and only if <code>o</code> is an MBeanInfo that is equal * to this one according to the rules above. */ @Override public boolean equals(Object o) { if (o == this) --- 480,490 ---- * <p>If two MBeanInfo objects return the same values in one of * their arrays but in a different order then they are not equal.</p> * * @param o the object to compare to. * ! * @return true if and only if {@code o} is an MBeanInfo that is equal * to this one according to the rules above. */ @Override public boolean equals(Object o) { if (o == this)
*** 532,547 **** */ private static final Map<Class<?>, Boolean> arrayGettersSafeMap = new WeakHashMap<Class<?>, Boolean>(); /** ! * Return true if <code>subclass</code> is known to preserve the ! * immutability of <code>immutableClass</code>. The class ! * <code>immutableClass</code> is a reference class that is known ! * to be immutable. The subclass <code>subclass</code> is * considered immutable if it does not override any public method ! * of <code>immutableClass</code> whose name begins with "get". * This is obviously not an infallible test for immutability, * but it works for the public interfaces of the MBean*Info classes. */ static boolean arrayGettersSafe(Class<?> subclass, Class<?> immutableClass) { if (subclass == immutableClass) --- 532,547 ---- */ private static final Map<Class<?>, Boolean> arrayGettersSafeMap = new WeakHashMap<Class<?>, Boolean>(); /** ! * Return true if {@code subclass} is known to preserve the ! * immutability of {@code immutableClass}. The class ! * {@code immutableClass} is a reference class that is known ! * to be immutable. The subclass {@code subclass} is * considered immutable if it does not override any public method ! * of {@code immutableClass} whose name begins with "get". * This is obviously not an infallible test for immutability, * but it works for the public interfaces of the MBean*Info classes. */ static boolean arrayGettersSafe(Class<?> subclass, Class<?> immutableClass) { if (subclass == immutableClass)
< prev index next >