001: /*
002: * JBoss, Home of Professional Open Source.
003: * Copyright 2006, Red Hat Middleware LLC, and individual contributors
004: * as indicated by the @author tags. See the copyright.txt file in the
005: * distribution for a full listing of individual contributors.
006: *
007: * This is free software; you can redistribute it and/or modify it
008: * under the terms of the GNU Lesser General Public License as
009: * published by the Free Software Foundation; either version 2.1 of
010: * the License, or (at your option) any later version.
011: *
012: * This software is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015: * Lesser General Public License for more details.
016: *
017: * You should have received a copy of the GNU Lesser General Public
018: * License along with this software; if not, write to the Free
019: * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
020: * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
021: */
022: package javax.management.modelmbean;
023:
024: import javax.management.Descriptor;
025: import javax.management.MBeanAttributeInfo;
026: import javax.management.MBeanConstructorInfo;
027: import javax.management.MBeanException;
028: import javax.management.MBeanNotificationInfo;
029:
030: import javax.management.MBeanOperationInfo;
031: import javax.management.RuntimeOperationsException;
032:
033: /**
034: * Interface for manipulating the meta data of a Model MBean.
035: *
036: * @author <a href="mailto:juha@jboss.org">Juha Lindfors</a>.
037: * @version $Revision: 57200 $
038: */
039: public interface ModelMBeanInfo {
040: /**
041: * Returns all descriptors with a requested type from a Model MBean.
042: * The descriptor type may be one of the following: <ul>
043: *
044: * <li>{@link org.jboss.mx.modelmbean.ModelMBeanConstants#MBEAN_DESCRIPTOR MBEAN_DESCRIPTOR}</li>
045: * <li>{@link org.jboss.mx.modelmbean.ModelMBeanConstants#ATTRIBUTE_DESCRIPTOR ATTRIBUTE_DESCRIPTOR}</li>
046: * <li>{@link org.jboss.mx.modelmbean.ModelMBeanConstants#OPERATION_DESCRIPTOR OPERATION_DESCRIPTOR}</li>
047: * <li>{@link org.jboss.mx.modelmbean.ModelMBeanConstants#NOTIFICATION_DESCRIPTOR NOTIFICATION_DESCRIPTOR}</li>
048: * <li>{@link org.jboss.mx.modelmbean.ModelMBeanConstants#CONSTRUCTOR_DESCRIPTOR CONSTRUCTOR_DESCRIPTOR}</li>
049: * <li>{@link org.jboss.mx.modelmbean.ModelMBeanConstants#ALL_DESCRIPTORS ALL_DESCRIPTORS}</li>
050: * </ul>
051: *
052: * @param descriptorType descriptor type string
053: *
054: * @return array of descriptors
055: *
056: * @throws MBeanException for no good reason
057: * @throws RuntimeOperationsException for no good reason
058: */
059: public Descriptor[] getDescriptors(String descriptorType)
060: throws MBeanException, RuntimeOperationsException;
061:
062: public void setDescriptors(Descriptor[] inDescriptors)
063: throws MBeanException, RuntimeOperationsException;
064:
065: public Descriptor getDescriptor(String inDescriptorName,
066: String inDescriptorType) throws MBeanException,
067: RuntimeOperationsException;
068:
069: public void setDescriptor(Descriptor inDescriptor,
070: String inDescriptorType) throws MBeanException,
071: RuntimeOperationsException;
072:
073: public Descriptor getMBeanDescriptor() throws MBeanException,
074: RuntimeOperationsException;
075:
076: public void setMBeanDescriptor(Descriptor inDescriptor)
077: throws MBeanException, RuntimeOperationsException;
078:
079: public ModelMBeanAttributeInfo getAttribute(String inName)
080: throws MBeanException, RuntimeOperationsException;
081:
082: public ModelMBeanOperationInfo getOperation(String inName)
083: throws MBeanException, RuntimeOperationsException;
084:
085: public ModelMBeanNotificationInfo getNotification(String inName)
086: throws MBeanException, RuntimeOperationsException;
087:
088: public Object clone();
089:
090: public MBeanAttributeInfo[] getAttributes();
091:
092: public String getClassName();
093:
094: public MBeanConstructorInfo[] getConstructors();
095:
096: public String getDescription();
097:
098: public MBeanNotificationInfo[] getNotifications();
099:
100: public MBeanOperationInfo[] getOperations();
101:
102: }
|