Package groovy.util

Class GroovyMBean

java.lang.Object
groovy.lang.GroovyObjectSupport
groovy.util.GroovyMBean
All Implemented Interfaces:
GroovyObject

@Deprecated
public class GroovyMBean
extends GroovyObjectSupport
Deprecated.
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

    Constructors
    Constructor Description
    GroovyMBean​(javax.management.MBeanServerConnection server, java.lang.String objectName)
    Deprecated.
     
    GroovyMBean​(javax.management.MBeanServerConnection server, java.lang.String objectName, boolean ignoreErrors)
    Deprecated.
     
    GroovyMBean​(javax.management.MBeanServerConnection server, javax.management.ObjectName name)
    Deprecated.
     
    GroovyMBean​(javax.management.MBeanServerConnection server, javax.management.ObjectName name, boolean ignoreErrors)
    Deprecated.
     
  • Method Summary

    Modifier and Type Method Description
    protected java.lang.String createOperationKey​(java.lang.String operation, int params)
    Deprecated.
    Construct a simple key based on the method name and the number of parameters
    protected java.lang.String[] createSignature​(javax.management.MBeanOperationInfo info)
    Deprecated.
     
    java.lang.String describeAttribute​(java.lang.String attributeName)
    Deprecated.
    Description of the specified attribute name.
    protected java.lang.String describeAttribute​(javax.management.MBeanAttributeInfo attr)
    Deprecated.
    Description of the specified attribute name.
    java.util.List<java.lang.String> describeOperation​(java.lang.String operationName)
    Deprecated.
    Get the description of the specified operation.
    protected java.lang.String describeOperation​(javax.management.MBeanOperationInfo operation)
    Deprecated.
    Description of the operation.
    java.lang.Object getProperty​(java.lang.String property)
    Deprecated.
    Retrieves a property value.
    javax.management.MBeanInfo info()
    Deprecated.
     
    java.lang.Object invokeMethod​(java.lang.String method, java.lang.Object arguments)
    Deprecated.
    Invokes the given method.
    java.util.Collection<java.lang.String> listAttributeDescriptions()
    Deprecated.
    List of string representations of all of the attributes on the MBean.
    java.util.Collection<java.lang.String> listAttributeNames()
    Deprecated.
    List of the names of each of the attributes on the MBean
    java.util.List<java.lang.String> listAttributeValues()
    Deprecated.
    The values of each of the attributes on the MBean
    java.util.Collection<java.lang.String> listOperationDescriptions()
    Deprecated.
    Description of all of the operations available on the MBean.
    java.util.Collection<java.lang.String> listOperationNames()
    Deprecated.
    Names of all the operations available on the MBean.
    javax.management.ObjectName name()
    Deprecated.
     
    javax.management.MBeanServerConnection server()
    Deprecated.
     
    void setProperty​(java.lang.String property, java.lang.Object value)
    Deprecated.
    Sets the given property to the new value.
    java.lang.String toString()
    Deprecated.
    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 Details

    • GroovyMBean

      public GroovyMBean​(javax.management.MBeanServerConnection server, java.lang.String objectName) throws javax.management.JMException, java.io.IOException
      Deprecated.
      Throws:
      javax.management.JMException
      java.io.IOException
    • GroovyMBean

      public GroovyMBean​(javax.management.MBeanServerConnection server, java.lang.String objectName, boolean ignoreErrors) throws javax.management.JMException, java.io.IOException
      Deprecated.
      Throws:
      javax.management.JMException
      java.io.IOException
    • GroovyMBean

      public GroovyMBean​(javax.management.MBeanServerConnection server, javax.management.ObjectName name) throws javax.management.JMException, java.io.IOException
      Deprecated.
      Throws:
      javax.management.JMException
      java.io.IOException
    • GroovyMBean

      public GroovyMBean​(javax.management.MBeanServerConnection server, javax.management.ObjectName name, boolean ignoreErrors) throws javax.management.JMException, java.io.IOException
      Deprecated.
      Throws:
      javax.management.JMException
      java.io.IOException
  • Method Details

    • server

      public javax.management.MBeanServerConnection server()
      Deprecated.
    • name

      public javax.management.ObjectName name()
      Deprecated.
    • info

      public javax.management.MBeanInfo info()
      Deprecated.
    • getProperty

      public java.lang.Object getProperty​(java.lang.String property)
      Deprecated.
      Description copied from interface: GroovyObject
      Retrieves a property value.
      Parameters:
      property - the name of the property of interest
      Returns:
      the given property
    • setProperty

      public void setProperty​(java.lang.String property, java.lang.Object value)
      Deprecated.
      Description copied from interface: GroovyObject
      Sets the given property to the new value.
      Parameters:
      property - the name of the property of interest
      value - the new value for the property
    • invokeMethod

      public java.lang.Object invokeMethod​(java.lang.String method, java.lang.Object arguments)
      Deprecated.
      Description copied from interface: GroovyObject
      Invokes 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

      protected java.lang.String[] createSignature​(javax.management.MBeanOperationInfo info)
      Deprecated.
    • createOperationKey

      protected java.lang.String createOperationKey​(java.lang.String operation, int params)
      Deprecated.
      Construct 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
    • listAttributeNames

      public java.util.Collection<java.lang.String> listAttributeNames()
      Deprecated.
      List of the names of each of the attributes on the MBean
      Returns:
      list of attribute names
    • listAttributeValues

      public java.util.List<java.lang.String> listAttributeValues()
      Deprecated.
      The values of each of the attributes on the MBean
      Returns:
      list of values of each attribute
    • listAttributeDescriptions

      public java.util.Collection<java.lang.String> listAttributeDescriptions()
      Deprecated.
      List of string representations of all of the attributes on the MBean.
      Returns:
      list of descriptions of each attribute on the mbean
    • describeAttribute

      protected java.lang.String describeAttribute​(javax.management.MBeanAttributeInfo attr)
      Deprecated.
      Description of the specified attribute name.
      Parameters:
      attr - - the attribute
      Returns:
      String the description
    • describeAttribute

      public java.lang.String describeAttribute​(java.lang.String attributeName)
      Deprecated.
      Description of the specified attribute name.
      Parameters:
      attributeName - - stringified name of the attribute
      Returns:
      the description
    • listOperationNames

      public java.util.Collection<java.lang.String> listOperationNames()
      Deprecated.
      Names of all the operations available on the MBean.
      Returns:
      all the operations on the MBean
    • listOperationDescriptions

      public java.util.Collection<java.lang.String> listOperationDescriptions()
      Deprecated.
      Description of all of the operations available on the MBean.
      Returns:
      full description of each operation on the MBean
    • describeOperation

      public java.util.List<java.lang.String> describeOperation​(java.lang.String operationName)
      Deprecated.
      Get 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
    • describeOperation

      protected java.lang.String describeOperation​(javax.management.MBeanOperationInfo operation)
      Deprecated.
      Description of the operation.
      Parameters:
      operation - the operation to describe
      Returns:
      pretty-printed description
    • toString

      public java.lang.String toString()
      Deprecated.
      Return an end user readable representation of the underlying MBean
      Overrides:
      toString in class java.lang.Object
      Returns:
      the user readable description