groovy.util
Class GroovyMBean
java.lang.Object
groovy.lang.GroovyObjectSupport
groovy.util.GroovyMBean
- All Implemented Interfaces:
- GroovyObject
- public class GroovyMBean
- extends GroovyObjectSupport
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.
- Version:
- $Revision: 1.3 $
- Author:
- James Strachan
Field Summary |
private javax.management.MBeanInfo |
beanInfo
|
private javax.management.ObjectName |
name
|
private java.util.Map |
operations
|
private javax.management.MBeanServerConnection |
server
|
Constructor Summary |
GroovyMBean(javax.management.MBeanServerConnection server,
javax.management.ObjectName name)
|
Method Summary |
protected java.lang.String[] |
createSignature(javax.management.MBeanOperationInfo info)
|
java.lang.Object |
getProperty(java.lang.String property)
|
javax.management.MBeanInfo |
info()
|
java.lang.Object |
invokeMethod(java.lang.String method,
java.lang.Object arguments)
Invokes the given method |
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 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
server
private javax.management.MBeanServerConnection server
name
private javax.management.ObjectName name
beanInfo
private javax.management.MBeanInfo beanInfo
operations
private java.util.Map operations
GroovyMBean
public GroovyMBean(javax.management.MBeanServerConnection server,
javax.management.ObjectName name)
throws javax.management.JMException,
java.io.IOException
server
public javax.management.MBeanServerConnection server()
name
public javax.management.ObjectName name()
info
public javax.management.MBeanInfo info()
getProperty
public java.lang.Object getProperty(java.lang.String property)
- Specified by:
getProperty
in interface GroovyObject
- Overrides:
getProperty
in class GroovyObjectSupport
setProperty
public void setProperty(java.lang.String property,
java.lang.Object value)
- Description copied from interface:
GroovyObject
- Sets the given property to the new value
- Specified by:
setProperty
in interface GroovyObject
- Overrides:
setProperty
in class GroovyObjectSupport
invokeMethod
public java.lang.Object invokeMethod(java.lang.String method,
java.lang.Object arguments)
- Description copied from interface:
GroovyObject
- Invokes the given method
- Specified by:
invokeMethod
in interface GroovyObject
- Overrides:
invokeMethod
in class GroovyObjectSupport
createSignature
protected java.lang.String[] createSignature(javax.management.MBeanOperationInfo info)
Copyright © 2003-2005 The Codehaus. All Rights Reserved.