0N/A/*
2362N/A * Copyright (c) 1999, 2003, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
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 *
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 *
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.
0N/A *
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
2362N/A * questions.
0N/A */
0N/A
0N/A
0N/Apackage javax.management;
0N/A
0N/A
0N/A/**
0N/A * Defines the methods that should be implemented by
0N/A * a Dynamic MBean (MBean that exposes a dynamic management interface).
0N/A *
0N/A * @since 1.5
0N/A */
0N/Apublic interface DynamicMBean {
0N/A
0N/A
0N/A /**
0N/A * Obtain the value of a specific attribute of the Dynamic MBean.
0N/A *
0N/A * @param attribute The name of the attribute to be retrieved
0N/A *
0N/A * @return The value of the attribute retrieved.
0N/A *
0N/A * @exception AttributeNotFoundException
0N/A * @exception MBeanException Wraps a <CODE>java.lang.Exception</CODE> thrown by the MBean's getter.
0N/A * @exception ReflectionException Wraps a <CODE>java.lang.Exception</CODE> thrown while trying to invoke the getter.
0N/A *
0N/A * @see #setAttribute
0N/A */
0N/A public Object getAttribute(String attribute) throws AttributeNotFoundException,
0N/A MBeanException, ReflectionException;
0N/A
0N/A /**
0N/A * Set the value of a specific attribute of the Dynamic MBean.
0N/A *
0N/A * @param attribute The identification of the attribute to
0N/A * be set and the value it is to be set to.
0N/A *
0N/A * @exception AttributeNotFoundException
0N/A * @exception InvalidAttributeValueException
0N/A * @exception MBeanException Wraps a <CODE>java.lang.Exception</CODE> thrown by the MBean's setter.
0N/A * @exception ReflectionException Wraps a <CODE>java.lang.Exception</CODE> thrown while trying to invoke the MBean's setter.
0N/A *
0N/A * @see #getAttribute
0N/A */
0N/A public void setAttribute(Attribute attribute) throws AttributeNotFoundException,
0N/A InvalidAttributeValueException, MBeanException, ReflectionException ;
0N/A
0N/A /**
0N/A * Get the values of several attributes of the Dynamic MBean.
0N/A *
0N/A * @param attributes A list of the attributes to be retrieved.
0N/A *
0N/A * @return The list of attributes retrieved.
0N/A *
0N/A * @see #setAttributes
0N/A */
0N/A public AttributeList getAttributes(String[] attributes);
0N/A
0N/A /**
0N/A * Sets the values of several attributes of the Dynamic MBean.
0N/A *
0N/A * @param attributes A list of attributes: The identification of the
0N/A * attributes to be set and the values they are to be set to.
0N/A *
0N/A * @return The list of attributes that were set, with their new values.
0N/A *
0N/A * @see #getAttributes
0N/A */
0N/A public AttributeList setAttributes(AttributeList attributes);
0N/A
0N/A /**
0N/A * Allows an action to be invoked on the Dynamic MBean.
0N/A *
0N/A * @param actionName The name of the action to be invoked.
0N/A * @param params An array containing the parameters to be set when the action is
0N/A * invoked.
0N/A * @param signature An array containing the signature of the action. The class objects will
0N/A * be loaded through the same class loader as the one used for loading the
0N/A * MBean on which the action is invoked.
0N/A *
0N/A * @return The object returned by the action, which represents the result of
0N/A * invoking the action on the MBean specified.
0N/A *
0N/A * @exception MBeanException Wraps a <CODE>java.lang.Exception</CODE> thrown by the MBean's invoked method.
0N/A * @exception ReflectionException Wraps a <CODE>java.lang.Exception</CODE> thrown while trying to invoke the method
0N/A */
0N/A public Object invoke(String actionName, Object params[], String signature[])
0N/A throws MBeanException, ReflectionException ;
0N/A
0N/A /**
0N/A * Provides the exposed attributes and actions of the Dynamic MBean using an MBeanInfo object.
0N/A *
0N/A * @return An instance of <CODE>MBeanInfo</CODE> allowing all attributes and actions
0N/A * exposed by this Dynamic MBean to be retrieved.
0N/A *
0N/A */
0N/A public MBeanInfo getMBeanInfo();
0N/A
0N/A }