Package groovy.jmx
Class GroovyMBean
java.lang.Object
groovy.lang.GroovyObjectSupport
groovy.jmx.GroovyMBean
- All Implemented Interfaces:
- GroovyObject
A GroovyObject facade for an underlying MBean which acts like a normal
 groovy object but which is actually implemented via
 an underlying JMX MBean.
 Properties and normal method invocations
 delegate to the MBeanServer to the actual MBean.
- 
Constructor SummaryConstructorsConstructorDescriptionGroovyMBean(MBeanServerConnection server, String objectName) GroovyMBean(MBeanServerConnection server, String objectName, boolean ignoreErrors) GroovyMBean(MBeanServerConnection server, ObjectName name) GroovyMBean(MBeanServerConnection server, ObjectName name, boolean ignoreErrors) 
- 
Method SummaryModifier and TypeMethodDescriptionprotected StringcreateOperationKey(String operation, int params) Construct a simple key based on the method name and the number of parametersprotected String[]describeAttribute(String attributeName) Description of the specified attribute name.protected StringDescription of the specified attribute name.describeOperation(String operationName) Get the description of the specified operation.protected StringdescribeOperation(MBeanOperationInfo operation) Description of the operation.getProperty(String property) Retrieves a property value.info()invokeMethod(String method, Object arguments) Invokes the given method.List of string representations of all the attributes on the MBean.List of the names of each of the attributes on the MBeanThe values of each of the attributes on the MBeanDescription of all the operations available on the MBean.Names of all the operations available on the MBean.name()server()voidsetProperty(String property, Object value) Sets the given property to the new value.toString()Return an end user readable representation of the underlying MBeanMethods inherited from class groovy.lang.GroovyObjectSupportgetMetaClass, setMetaClass
- 
Constructor Details- 
GroovyMBean- Throws:
- JMException
- IOException
 
- 
GroovyMBeanpublic GroovyMBean(MBeanServerConnection server, String objectName, boolean ignoreErrors) throws JMException, IOException - Throws:
- JMException
- IOException
 
- 
GroovyMBean- Throws:
- JMException
- IOException
 
- 
GroovyMBeanpublic GroovyMBean(MBeanServerConnection server, ObjectName name, boolean ignoreErrors) throws JMException, IOException - Throws:
- JMException
- IOException
 
 
- 
- 
Method Details- 
server
- 
name
- 
info
- 
getPropertyDescription copied from interface:GroovyObjectRetrieves a property value.- Parameters:
- property- the name of the property of interest
- Returns:
- the given property
 
- 
setPropertyDescription copied from interface:GroovyObjectSets the given property to the new value.- Parameters:
- property- the name of the property of interest
- value- the new value for the property
 
- 
invokeMethodDescription copied from interface:GroovyObjectInvokes the given method.- Parameters:
- method- the name of the method to call
- arguments- the arguments to use for the method call
- Returns:
- the result of invoking the method
 
- 
createSignature
- 
createOperationKeyConstruct a simple key based on the method name and the number of parameters- Parameters:
- operation- - the mbean operation name
- params- - the number of parameters the operation supports
- Returns:
- simple unique identifier for a method
 
- 
listAttributeNamesList of the names of each of the attributes on the MBean- Returns:
- list of attribute names
 
- 
listAttributeValuesThe values of each of the attributes on the MBean- Returns:
- list of values of each attribute
 
- 
listAttributeDescriptionsList of string representations of all the attributes on the MBean.- Returns:
- list of descriptions of each attribute on the mbean
 
- 
describeAttributeDescription of the specified attribute name.- Parameters:
- attr- - the attribute
- Returns:
- String the description
 
- 
describeAttributeDescription of the specified attribute name.- Parameters:
- attributeName- - stringified name of the attribute
- Returns:
- the description
 
- 
listOperationNamesNames of all the operations available on the MBean.- Returns:
- all the operations on the MBean
 
- 
listOperationDescriptionsDescription of all the operations available on the MBean.- Returns:
- full description of each operation on the MBean
 
- 
describeOperationGet the description of the specified operation. This returns a Collection since operations can be overloaded and one operationName can have multiple forms.- Parameters:
- operationName- the name of the operation to describe
- Returns:
- Collection of operation description
 
- 
describeOperationDescription of the operation.- Parameters:
- operation- the operation to describe
- Returns:
- pretty-printed description
 
- 
toStringReturn an end user readable representation of the underlying MBean
 
-