|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgroovy.lang.GroovyObjectSupport
groovy.util.GroovyMBean
public class GroovyMBean
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 Summary | |
---|---|
GroovyMBean(MBeanServerConnection server,
ObjectName name)
|
|
GroovyMBean(MBeanServerConnection server,
ObjectName name,
boolean ignoreErrors)
|
|
GroovyMBean(MBeanServerConnection server,
String objectName)
|
|
GroovyMBean(MBeanServerConnection server,
String objectName,
boolean ignoreErrors)
|
Method Summary | |
---|---|
protected String |
createOperationKey(String operation,
int params)
Construct a simple key based on the method name and the number of parameters |
protected String[] |
createSignature(MBeanOperationInfo info)
|
protected String |
describeAttribute(MBeanAttributeInfo attr)
Description of the specified attribute name. |
String |
describeAttribute(String attributeName)
Description of the specified attribute name. |
protected String |
describeOperation(MBeanOperationInfo operation)
Description of the operation. |
List |
describeOperation(String operationName)
Get the description of the specified operation. |
Object |
getProperty(String property)
Retrieves a property value. |
MBeanInfo |
info()
|
Object |
invokeMethod(String method,
Object arguments)
Invokes the given method. |
Collection |
listAttributeDescriptions()
List of string representations of all of the attributes on the MBean. |
Collection |
listAttributeNames()
List of the names of each of the attributes on the MBean |
List |
listAttributeValues()
The values of each of the attributes on the MBean |
Collection |
listOperationDescriptions()
Description of all of the operations available on the MBean. |
Collection |
listOperationNames()
Names of all the operations available on the MBean. |
ObjectName |
name()
|
MBeanServerConnection |
server()
|
void |
setProperty(String property,
Object value)
Sets the given property to the new value. |
String |
toString()
Return an end user readable representation of the underlying MBean |
Methods inherited from class groovy.lang.GroovyObjectSupport |
---|
getMetaClass, setMetaClass |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public GroovyMBean(MBeanServerConnection server, String objectName) throws JMException, IOException
JMException
IOException
public GroovyMBean(MBeanServerConnection server, String objectName, boolean ignoreErrors) throws JMException, IOException
JMException
IOException
public GroovyMBean(MBeanServerConnection server, ObjectName name) throws JMException, IOException
JMException
IOException
public GroovyMBean(MBeanServerConnection server, ObjectName name, boolean ignoreErrors) throws JMException, IOException
JMException
IOException
Method Detail |
---|
public MBeanServerConnection server()
public ObjectName name()
public MBeanInfo info()
public Object getProperty(String property)
GroovyObject
getProperty
in interface GroovyObject
getProperty
in class GroovyObjectSupport
property
- the name of the property of interest
public void setProperty(String property, 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 Object invokeMethod(String method, 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 call
protected String[] createSignature(MBeanOperationInfo info)
protected String createOperationKey(String operation, int params)
operation
- - the mbean operation nameparams
- - the number of parameters the operation supports
public Collection listAttributeNames()
public List listAttributeValues()
public Collection listAttributeDescriptions()
protected String describeAttribute(MBeanAttributeInfo attr)
attr
- - the attribute
public String describeAttribute(String attributeName)
attributeName
- - stringified name of the attribute
public Collection listOperationNames()
public Collection listOperationDescriptions()
public List describeOperation(String operationName)
operationName
- the name of the operation to describe
protected String describeOperation(MBeanOperationInfo operation)
operation
- the operation to describe
public String toString()
toString
in class Object
|
Copyright © 2003-2009 The Codehaus. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |