org.apache.commons.modeler
Class ManagedBean

java.lang.Object
  |
  +--org.apache.commons.modeler.ManagedBean

public class ManagedBean
extends java.lang.Object

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

Version:
$Revision: 1.1.1.1 $ $Date: 2002/04/30 20:58:51 $
Author:
Craig R. McClanahan

Field Summary
protected  AttributeInfo[] attributes
          The collection of attributes for this MBean.
protected  java.lang.String className
          The fully qualified name of the Java class of the MBean described by this descriptor.
protected  ConstructorInfo[] constructors
          The collection of constructors for this MBean.
protected  java.lang.String description
          The human-readable description of this MBean.
protected  java.lang.String domain
          The (optional) ObjectName domain in which this MBean should be registered in the MBeanServer.
protected  java.lang.String group
          The (optional) group to which this MBean belongs.
(package private)  javax.management.modelmbean.ModelMBeanInfo info
          The ModelMBeanInfo object that corresponds to this ManagedBean instance.
protected  java.lang.String name
          The name of this managed bean, which must be unique among all MBeans managed by a particular MBeans server.
protected  NotificationInfo[] notifications
          The collection of notifications for this MBean.
protected  OperationInfo[] operations
          The collection of operations for this MBean.
protected  java.lang.String type
          The fully qualified name of the Java class of the resource implementation class described by the managed bean described by this descriptor.
 
Constructor Summary
ManagedBean()
           
 
Method Summary
 void addAttribute(AttributeInfo attribute)
          Add a new attribute to the set of attributes for this MBean.
 void addConstructor(ConstructorInfo constructor)
          Add a new constructor to the set of constructors 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.modelmbean.ModelMBean 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.modelmbean.ModelMBean 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.
 javax.management.modelmbean.ModelMBeanInfo createMBeanInfo()
          Create and return a ModelMBeanInfo object that describes this entire managed bean.
 AttributeInfo[] getAttributes()
           
 java.lang.String getClassName()
           
 ConstructorInfo[] getConstructors()
           
 java.lang.String getDescription()
           
 java.lang.String getDomain()
           
 java.lang.String getGroup()
           
 java.lang.String getName()
           
 NotificationInfo[] getNotifications()
           
 OperationInfo[] getOperations()
           
 java.lang.String getType()
           
 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, registerNatives, wait, wait, wait
 

Field Detail

info

javax.management.modelmbean.ModelMBeanInfo info
The ModelMBeanInfo object that corresponds to this ManagedBean instance.

attributes

protected AttributeInfo[] attributes
The collection of attributes for this MBean.

className

protected java.lang.String className
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.

constructors

protected ConstructorInfo[] constructors
The collection of constructors for this MBean.

description

protected java.lang.String description
The human-readable description of this MBean.

domain

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

group

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

name

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

notifications

protected NotificationInfo[] notifications
The collection of notifications for this MBean.

operations

protected OperationInfo[] operations
The collection of operations for this MBean.

type

protected java.lang.String type
The fully qualified name of the Java class of the resource implementation class described by the managed bean described by this descriptor.
Constructor Detail

ManagedBean

public ManagedBean()
Method Detail

getAttributes

public AttributeInfo[] getAttributes()

getClassName

public java.lang.String getClassName()

setClassName

public void setClassName(java.lang.String className)

getConstructors

public ConstructorInfo[] getConstructors()

getDescription

public java.lang.String getDescription()

setDescription

public void setDescription(java.lang.String description)

getDomain

public java.lang.String getDomain()

setDomain

public void setDomain(java.lang.String domain)

getGroup

public java.lang.String getGroup()

setGroup

public void setGroup(java.lang.String group)

getName

public java.lang.String getName()

setName

public void setName(java.lang.String name)

getNotifications

public NotificationInfo[] getNotifications()

getOperations

public OperationInfo[] getOperations()

getType

public java.lang.String getType()

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

addConstructor

public void addConstructor(ConstructorInfo constructor)
Add a new constructor to the set of constructors for this MBean.
Parameters:
constructor - The new constructor 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.modelmbean.ModelMBean createMBean()
                                                   throws javax.management.InstanceNotFoundException,
                                                          javax.management.modelmbean.InvalidTargetObjectTypeException,
                                                          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
javax.management.modelmbean.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.modelmbean.ModelMBean createMBean(java.lang.Object instance)
                                                   throws javax.management.InstanceNotFoundException,
                                                          javax.management.modelmbean.InvalidTargetObjectTypeException,
                                                          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
javax.management.modelmbean.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

createMBeanInfo

public javax.management.modelmbean.ModelMBeanInfo createMBeanInfo()
Create and return a ModelMBeanInfo object that describes this entire managed bean.

toString

public java.lang.String toString()
Return a string representation of this managed bean.
Overrides:
toString in class java.lang.Object


Copyright (c) 2001-2002 - Apache Software Foundation