public class GroovyMBean extends GroovyObjectSupport
Constructor and Description |
---|
GroovyMBean(javax.management.MBeanServerConnection server,
javax.management.ObjectName name) |
GroovyMBean(javax.management.MBeanServerConnection server,
javax.management.ObjectName name,
boolean ignoreErrors) |
GroovyMBean(javax.management.MBeanServerConnection server,
java.lang.String objectName) |
GroovyMBean(javax.management.MBeanServerConnection server,
java.lang.String objectName,
boolean ignoreErrors) |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
createOperationKey(java.lang.String operation,
int params)
Construct a simple key based on the method name and the number of parameters
|
protected java.lang.String[] |
createSignature(javax.management.MBeanOperationInfo info) |
protected java.lang.String |
describeAttribute(javax.management.MBeanAttributeInfo attr)
Description of the specified attribute name.
|
java.lang.String |
describeAttribute(java.lang.String attributeName)
Description of the specified attribute name.
|
protected java.lang.String |
describeOperation(javax.management.MBeanOperationInfo operation)
Description of the operation.
|
java.util.List<java.lang.String> |
describeOperation(java.lang.String operationName)
Get the description of the specified operation.
|
java.lang.Object |
getProperty(java.lang.String property)
Retrieves a property value.
|
javax.management.MBeanInfo |
info() |
java.lang.Object |
invokeMethod(java.lang.String method,
java.lang.Object arguments)
Invokes the given method.
|
java.util.Collection<java.lang.String> |
listAttributeDescriptions()
List of string representations of all of the attributes on the MBean.
|
java.util.Collection<java.lang.String> |
listAttributeNames()
List of the names of each of the attributes on the MBean
|
java.util.List<java.lang.String> |
listAttributeValues()
The values of each of the attributes on the MBean
|
java.util.Collection<java.lang.String> |
listOperationDescriptions()
Description of all of the operations available on the MBean.
|
java.util.Collection<java.lang.String> |
listOperationNames()
Names of all the operations available on the MBean.
|
javax.management.ObjectName |
name() |
javax.management.MBeanServerConnection |
server() |
void |
setProperty(java.lang.String property,
java.lang.Object value)
Sets the given property to the new value.
|
java.lang.String |
toString()
Return an end user readable representation of the underlying MBean
|
getMetaClass, setMetaClass
public GroovyMBean(javax.management.MBeanServerConnection server, java.lang.String objectName) throws javax.management.JMException, java.io.IOException
javax.management.JMException
java.io.IOException
public GroovyMBean(javax.management.MBeanServerConnection server, java.lang.String objectName, boolean ignoreErrors) throws javax.management.JMException, java.io.IOException
javax.management.JMException
java.io.IOException
public GroovyMBean(javax.management.MBeanServerConnection server, javax.management.ObjectName name) throws javax.management.JMException, java.io.IOException
javax.management.JMException
java.io.IOException
public GroovyMBean(javax.management.MBeanServerConnection server, javax.management.ObjectName name, boolean ignoreErrors) throws javax.management.JMException, java.io.IOException
javax.management.JMException
java.io.IOException
public javax.management.MBeanServerConnection server()
public javax.management.ObjectName name()
public javax.management.MBeanInfo info()
public java.lang.Object getProperty(java.lang.String property)
GroovyObject
getProperty
in interface GroovyObject
getProperty
in class GroovyObjectSupport
property
- the name of the property of interestpublic void setProperty(java.lang.String property, java.lang.Object value)
GroovyObject
setProperty
in interface GroovyObject
setProperty
in class GroovyObjectSupport
property
- the name of the property of interestvalue
- the new value for the propertypublic java.lang.Object invokeMethod(java.lang.String method, java.lang.Object arguments)
GroovyObject
invokeMethod
in interface GroovyObject
invokeMethod
in class GroovyObjectSupport
method
- the name of the method to callarguments
- the arguments to use for the method callprotected java.lang.String[] createSignature(javax.management.MBeanOperationInfo info)
protected java.lang.String createOperationKey(java.lang.String operation, int params)
operation
- - the mbean operation nameparams
- - the number of parameters the operation supportspublic java.util.Collection<java.lang.String> listAttributeNames()
public java.util.List<java.lang.String> listAttributeValues()
public java.util.Collection<java.lang.String> listAttributeDescriptions()
protected java.lang.String describeAttribute(javax.management.MBeanAttributeInfo attr)
attr
- - the attributepublic java.lang.String describeAttribute(java.lang.String attributeName)
attributeName
- - stringified name of the attributepublic java.util.Collection<java.lang.String> listOperationNames()
public java.util.Collection<java.lang.String> listOperationDescriptions()
public java.util.List<java.lang.String> describeOperation(java.lang.String operationName)
operationName
- the name of the operation to describeprotected java.lang.String describeOperation(javax.management.MBeanOperationInfo operation)
operation
- the operation to describepublic java.lang.String toString()
toString
in class java.lang.Object