Package org.apache.tomcat.util.modeler
Class ManagedBean
- java.lang.Object
- 
- org.apache.tomcat.util.modeler.ManagedBean
 
- 
- All Implemented Interfaces:
- java.io.Serializable
 
 public class ManagedBean extends java.lang.Object implements java.io.SerializableInternal configuration information for a managed bean (MBean) descriptor. - Author:
- Craig R. McClanahan
- See Also:
- Serialized Form
 
- 
- 
Constructor SummaryConstructors Constructor Description ManagedBean()Constructor.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAttribute(AttributeInfo attribute)Add a new attribute to the set of attributes for this MBean.voidaddNotification(NotificationInfo notification)Add a new notification to the set of notifications for this MBean.voidaddOperation(OperationInfo operation)Add a new operation to the set of operations for this MBean.javax.management.DynamicMBeancreateMBean(java.lang.Object instance)Create and return aModelMBeanthat has been preconfigured with theModelMBeanInfoinformation for this managed bean, and is associated with the specified managed object instance.AttributeInfo[]getAttributes()java.lang.StringgetClassName()The fully qualified name of the Java class of the MBean described by this descriptor.java.lang.StringgetDescription()java.lang.StringgetDomain()java.lang.StringgetGroup()java.lang.reflect.MethodgetInvoke(java.lang.String aname, java.lang.Object[] params, java.lang.String[] signature, BaseModelMBean bean, java.lang.Object resource)java.lang.StringgetName()NotificationInfo[]getNotifications()OperationInfo[]getOperations()java.lang.reflect.MethodgetSetter(java.lang.String aname, BaseModelMBean bean, java.lang.Object resource)java.lang.StringgetType()voidsetClassName(java.lang.String className)voidsetDescription(java.lang.String description)voidsetDomain(java.lang.String domain)voidsetGroup(java.lang.String group)voidsetName(java.lang.String name)voidsetType(java.lang.String type)java.lang.StringtoString()Return a string representation of this managed bean.
 
- 
- 
- 
Method Detail- 
getAttributespublic AttributeInfo[] getAttributes() - Returns:
- the collection of attributes for this MBean.
 
 - 
getClassNamepublic java.lang.String getClassName() The fully qualified name of the Java class of the MBean described by this descriptor. If not specified, the standard JMX class (javax.management.modelmbean.RequiredModeLMBean) will be utilized.- Returns:
- the class name
 
 - 
setClassNamepublic void setClassName(java.lang.String className) 
 - 
getDescriptionpublic java.lang.String getDescription() - Returns:
- the human-readable description of this MBean.
 
 - 
setDescriptionpublic void setDescription(java.lang.String description) 
 - 
getDomainpublic java.lang.String getDomain() - Returns:
- the (optional) ObjectNamedomain in which this MBean should be registered in the MBeanServer.
 
 - 
setDomainpublic void setDomain(java.lang.String domain) 
 - 
getGrouppublic java.lang.String getGroup() - Returns:
- the (optional) group to which this MBean belongs.
 
 - 
setGrouppublic void setGroup(java.lang.String group) 
 - 
getNamepublic java.lang.String getName() - Returns:
- the name of this managed bean, which must be unique among all MBeans managed by a particular MBeans server.
 
 - 
setNamepublic void setName(java.lang.String name) 
 - 
getNotificationspublic NotificationInfo[] getNotifications() - Returns:
- the collection of notifications for this MBean.
 
 - 
getOperationspublic OperationInfo[] getOperations() - Returns:
- the collection of operations for this MBean.
 
 - 
getTypepublic java.lang.String getType() - Returns:
- the fully qualified name of the Java class of the resource implementation class described by the managed bean described by this descriptor.
 
 - 
setTypepublic void setType(java.lang.String type) 
 - 
addAttributepublic void addAttribute(AttributeInfo attribute) Add a new attribute to the set of attributes for this MBean.- Parameters:
- attribute- The new attribute descriptor
 
 - 
addNotificationpublic void addNotification(NotificationInfo notification) Add a new notification to the set of notifications for this MBean.- Parameters:
- notification- The new notification descriptor
 
 - 
addOperationpublic void addOperation(OperationInfo operation) Add a new operation to the set of operations for this MBean.- Parameters:
- operation- The new operation descriptor
 
 - 
createMBeanpublic javax.management.DynamicMBean createMBean(java.lang.Object instance) throws javax.management.InstanceNotFoundException, javax.management.MBeanException, javax.management.RuntimeOperationsExceptionCreate and return aModelMBeanthat has been preconfigured with theModelMBeanInfoinformation for this managed bean, and is associated with the specified managed object instance. The returnedModelMBeanwill NOT have been registered with ourMBeanServer.- Parameters:
- instance- Instanced of the managed object, or- nullfor no associated instance
- Returns:
- the MBean
- Throws:
- javax.management.InstanceNotFoundException- if the managed resource object cannot be found
- javax.management.MBeanException- if a problem occurs instantiating the- ModelMBeaninstance
- javax.management.RuntimeOperationsException- if a JMX runtime error occurs
 
 - 
toStringpublic java.lang.String toString() Return a string representation of this managed bean.- Overrides:
- toStringin class- java.lang.Object
 
 - 
getSetterpublic java.lang.reflect.Method getSetter(java.lang.String aname, BaseModelMBean bean, java.lang.Object resource) throws javax.management.AttributeNotFoundException, javax.management.ReflectionException- Throws:
- javax.management.AttributeNotFoundException
- javax.management.ReflectionException
 
 - 
getInvokepublic java.lang.reflect.Method getInvoke(java.lang.String aname, java.lang.Object[] params, java.lang.String[] signature, BaseModelMBean bean, java.lang.Object resource) throws javax.management.MBeanException, javax.management.ReflectionException- Throws:
- javax.management.MBeanException
- javax.management.ReflectionException
 
 
- 
 
-