Apache Tomcat 6.0.43

org.apache.tomcat.util.modeler
Class ManagedBean

java.lang.Object
  extended by org.apache.tomcat.util.modeler.ManagedBean
All Implemented Interfaces:
java.io.Serializable

public class ManagedBean
extends java.lang.Object
implements java.io.Serializable

Internal configuration information for a managed bean (MBean) descriptor.

Author:
Craig R. McClanahan
See Also:
Serialized Form

Field Summary
protected  java.lang.String className
           
protected  java.lang.String description
           
protected  java.lang.String domain
           
protected  java.lang.String group
           
protected  java.lang.String name
           
protected  NotificationInfo[] notifications
           
protected  java.lang.String type
           
 
Constructor Summary
ManagedBean()
          Constructor.
 
Method Summary
 void addAttribute(AttributeInfo attribute)
          Add a new attribute to the set of attributes for this MBean.
 void addNotification(NotificationInfo notification)
          Add a new notification to the set of notifications for this MBean.
 void addOperation(OperationInfo operation)
          Add a new operation to the set of operations for this MBean.
 javax.management.DynamicMBean createMBean()
          Create and return a ModelMBean that has been preconfigured with the ModelMBeanInfo information for this managed bean, but is not associated with any particular managed resource.
 javax.management.DynamicMBean createMBean(java.lang.Object instance)
          Create and return a ModelMBean that has been preconfigured with the ModelMBeanInfo information for this managed bean, and is associated with the specified managed object instance.
 AttributeInfo[] getAttributes()
          The collection of attributes for this MBean.
 java.lang.String getClassName()
          The fully qualified name of the Java class of the MBean described by this descriptor.
 java.lang.String getDescription()
          The human-readable description of this MBean.
 java.lang.String getDomain()
          The (optional) ObjectName domain in which this MBean should be registered in the MBeanServer.
 java.lang.String getGroup()
          The (optional) group to which this MBean belongs.
 java.lang.reflect.Method getInvoke(java.lang.String aname, java.lang.Object[] params, java.lang.String[] signature, BaseModelMBean bean, java.lang.Object resource)
           
 java.lang.String getName()
          The name of this managed bean, which must be unique among all MBeans managed by a particular MBeans server.
 NotificationInfo[] getNotifications()
          The collection of notifications for this MBean.
 OperationInfo[] getOperations()
          The collection of operations for this MBean.
 java.lang.reflect.Method getSetter(java.lang.String aname, BaseModelMBean bean, java.lang.Object resource)
           
 java.lang.String getType()
          The fully qualified name of the Java class of the resource implementation class described by the managed bean described by this descriptor.
 void setClassName(java.lang.String className)
           
 void setDescription(java.lang.String description)
           
 void setDomain(java.lang.String domain)
           
 void setGroup(java.lang.String group)
           
 void setName(java.lang.String name)
           
 void setType(java.lang.String type)
           
 java.lang.String toString()
          Return a string representation of this managed bean.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

className

protected java.lang.String className

description

protected java.lang.String description

domain

protected java.lang.String domain

group

protected java.lang.String group

name

protected java.lang.String name

notifications

protected NotificationInfo[] notifications

type

protected java.lang.String type
Constructor Detail

ManagedBean

public ManagedBean()
Constructor. Will add default attributes.

Method Detail

getAttributes

public AttributeInfo[] getAttributes()
The collection of attributes for this MBean.


getClassName

public 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.


setClassName

public void setClassName(java.lang.String className)

getDescription

public java.lang.String getDescription()
The human-readable description of this MBean.


setDescription

public void setDescription(java.lang.String description)

getDomain

public java.lang.String getDomain()
The (optional) ObjectName domain in which this MBean should be registered in the MBeanServer.


setDomain

public void setDomain(java.lang.String domain)

getGroup

public java.lang.String getGroup()
The (optional) group to which this MBean belongs.


setGroup

public void setGroup(java.lang.String group)

getName

public java.lang.String getName()
The name of this managed bean, which must be unique among all MBeans managed by a particular MBeans server.


setName

public void setName(java.lang.String name)

getNotifications

public NotificationInfo[] getNotifications()
The collection of notifications for this MBean.


getOperations

public OperationInfo[] getOperations()
The collection of operations for this MBean.


getType

public java.lang.String getType()
The fully qualified name of the Java class of the resource implementation class described by the managed bean described by this descriptor.


setType

public void setType(java.lang.String type)

addAttribute

public void addAttribute(AttributeInfo attribute)
Add a new attribute to the set of attributes for this MBean.

Parameters:
attribute - The new attribute descriptor

addNotification

public void addNotification(NotificationInfo notification)
Add a new notification to the set of notifications for this MBean.

Parameters:
notification - The new notification descriptor

addOperation

public void addOperation(OperationInfo operation)
Add a new operation to the set of operations for this MBean.

Parameters:
operation - The new operation descriptor

createMBean

public javax.management.DynamicMBean createMBean()
                                          throws javax.management.InstanceNotFoundException,
                                                 javax.management.MBeanException,
                                                 javax.management.RuntimeOperationsException
Create and return a ModelMBean that has been preconfigured with the ModelMBeanInfo information for this managed bean, but is not associated with any particular managed resource. The returned ModelMBean will NOT have been registered with our MBeanServer.

Throws:
javax.management.InstanceNotFoundException - if the managed resource object cannot be found
InvalidTargetObjectTypeException - if our MBean cannot handle object references (should never happen)
javax.management.MBeanException - if a problem occurs instantiating the ModelMBean instance
javax.management.RuntimeOperationsException - if a JMX runtime error occurs

createMBean

public javax.management.DynamicMBean createMBean(java.lang.Object instance)
                                          throws javax.management.InstanceNotFoundException,
                                                 javax.management.MBeanException,
                                                 javax.management.RuntimeOperationsException
Create and return a ModelMBean that has been preconfigured with the ModelMBeanInfo information for this managed bean, and is associated with the specified managed object instance. The returned ModelMBean will NOT have been registered with our MBeanServer.

Parameters:
instance - Instanced of the managed object, or null for no associated instance
Throws:
javax.management.InstanceNotFoundException - if the managed resource object cannot be found
InvalidTargetObjectTypeException - if our MBean cannot handle object references (should never happen)
javax.management.MBeanException - if a problem occurs instantiating the ModelMBean instance
javax.management.RuntimeOperationsException - if a JMX runtime error occurs

toString

public java.lang.String toString()
Return a string representation of this managed bean.

Overrides:
toString in class java.lang.Object

getSetter

public java.lang.reflect.Method getSetter(java.lang.String aname,
                                          BaseModelMBean bean,
                                          java.lang.Object resource)
                                   throws javax.management.AttributeNotFoundException,
                                          javax.management.MBeanException,
                                          javax.management.ReflectionException
Throws:
javax.management.AttributeNotFoundException
javax.management.MBeanException
javax.management.ReflectionException

getInvoke

public 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

Apache Tomcat 6.0.43

Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.