Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.jdmk
Interface ProxyHandler

All Known Subinterfaces:
  RemoteMBeanServer

All Known Implementing Classes:
  MBeanServerImpl

public interface ProxyHandler
extends NotificationRegistration

This interface groups all functions necessary to support a proxy. If both a remote and a local MBean server implement this interface, it will allow a proxy based application to be ran at remote or local MBean server side without modifying its code.

Method Summary
`java.lang.Object` | `getAttribute(ObjectName name, java.lang.String attribute)` Gets the value of a specific attribute of an MBean
`AttributeList` | `getAttributes(ObjectName name, java.lang.String[] attributes)` Gets a set of attributes in an MBean.
`MBeanInfo` | `getMBeanInfo(ObjectName name)` Discovers the attributes and operations that an MBean exposes for management.
`java.lang.Object` | `invoke(ObjectName name, java.lang.String operationName, java.lang.Object[] params, java.lang.String[] signature)` Invokes an operation on an MBean.
`void` | `setAttribute(ObjectName name, Attribute attribute)` Sets a specific attribute in an MBean.
`AttributeList` | `setAttributes(ObjectName name, AttributeList attributes)` Sets a set of attributes in an MBean.
`void` | `unregisterMBean(ObjectName name)` Unregisters an MBean from the MBean server.

Methods inherited from interface com.sun.jdmk.NotificationRegistration
`addNotificationListener, removeNotificationListener`

Method Detail

### unregisterMBean

    public void unregisterMBean(ObjectName name)
                         throws InstanceNotFoundException,
                                MBeanRegistrationException

  Unregisters an MBean from the MBean server. The MBean is identified by its object name. Once the method has been invoked, the MBean may no longer be accessed by its object name.
  Parameters:
    `name` - The object name of the MBean to be unregistered.
  Throws:
    InstanceNotFoundException - The MBean specified is not registered in the MBean server.
    MBeanRegistrationException - The preDeregister ((`MBeanRegistration` interface) method of the MBean has thrown an exception.
    RuntimeOperationsException - Wraps a `java.lang.IllegalArgumentException`: The object name in parameter is null or the MBean you are when trying to de-register is the `MBeanServerDelegate` MBean.

### getAttribute

    public java.lang.Object getAttribute(ObjectName name,
                                         java.lang.String attribute)
                                  throws MBeanException,
                                         AttributeNotFoundException,
                                         InstanceNotFoundException,
                                         ReflectionException

  Gets the value of a specific attribute of an MBean
  Parameters:
    `name` - The object name of the MBean from which the attribute is to be retrieved.
    `attribute` - A String specifying the name of the attribute to be retrieved.
  Returns:
    The value of the retrieved attribute.
  Throws:
    AttributeNotFoundException - The attribute specified is not accessible in the MBean.
    MBeanException - Wraps an exception thrown by the MBean's getter.
    InstanceNotFoundException - The MBean specified is not registered in the MBean server.
    ReflectionException - Wraps a `java.lang.Exception` thrown when trying to invoke the setter.
    RuntimeOperationsException - Wraps a `java.lang.IllegalArgumentException`: The object name in parameter is null or the attribute in parameter is null.

### getAttributes

    public AttributeList getAttributes(ObjectName name,
                                       java.lang.String[] attributes)
                                throws InstanceNotFoundException,
                                       ReflectionException

  Gets a set of attributes in an MBean.
  Parameters:
    `name` - The object name of the MBean from which the attributes are retrieved.
    `attributes` - A list of the attributes to be retrieved.
  Returns:
    The list of the retrieved attributes.
  Throws:
    InstanceNotFoundException - The MBean specified is not registered in the MBean server.
    ReflectionException - An exception occurred when trying to invoke the getAttributes method of a Dynamic MBean.
    RuntimeOperationsException - Wrap a `java.lang.IllegalArgumentException`: The object name in parameter is null or attributes in parameter is null.

### setAttribute

    public void setAttribute(ObjectName name,
                             Attribute attribute)
                      throws InstanceNotFoundException,
                             AttributeNotFoundException,
                             InvalidAttributeValueException,
                             MBeanException,
                             ReflectionException

  Sets a specific attribute in an MBean.
  Parameters:
    `name` - The name of the MBean within which the attribute is to be set.
    `attribute` - The identification of the attribute to be set and the value it is to be set to.
  Throws:
    InstanceNotFoundException - The MBean specified is not registered in the MBean server.
    AttributeNotFoundException - The attribute specified is not accessible in the MBean.
    InvalidAttributeValueException - The value specified for the attribute is not valid.
    MBeanException - Wraps an exception thrown by the MBean's setter.
    ReflectionException - Wraps a `java.lang.Exception` thrown when trying to invoke the setter.
    RuntimeOperationsException - Wraps a `java.lang.IllegalArgumentException`: The object name in parameter is null or the attribute in parameter is null.

### setAttributes

    public AttributeList setAttributes(ObjectName name,
                                       AttributeList attributes)
                                throws InstanceNotFoundException,
                                       ReflectionException

  Sets a set of attributes in an MBean.
  Parameters:
    `name` - The object name of the MBean within which the attributes are to be set.
    `attributes` - A list of attributes: The identification of the attributes to be set and the values they are to be set to.
  Returns:
    The list of attributes that were set, with their new values.
  Throws:
    InstanceNotFoundException - The MBean specified is not registered in the MBean server.
    ReflectionException - An exception occurred when trying to invoke the getAttributes method of a Dynamic MBean.
    RuntimeOperationsException - Wraps a `java.lang.IllegalArgumentException`: The object name in parameter is null or attributes in parameter is null.

### invoke

    public java.lang.Object invoke(ObjectName name,
                                   java.lang.String operationName,
                                   java.lang.Object[] params,
                                   java.lang.String[] signature)
                            throws InstanceNotFoundException,
                                   MBeanException,
                                   ReflectionException

  Invokes an operation on an MBean.
  Parameters:
    `name` - The object name of the MBean on which the method is to be invoked.
    `operationName` - The name of the operation to be invoked.
    `params` - An array containing the parameters to be set when the operation is invoked
    `signature` - An array containing the signature of the operation. The class objects will be loaded using the same class loader as the one used for loading the MBean on which the operation was invoked.
  Returns:
    The object returned by the operation, which represents the result ofinvoking the operation on the MBean specified.
  Throws:
    InstanceNotFoundException - The MBean specified is not registered in the MBean server.
    MBeanException - Wraps an exception thrown by the MBean's invoked method.
    ReflectionException - Wraps a `java.lang.Exception` thrown while trying to invoke the method.

### getMBeanInfo

    public MBeanInfo getMBeanInfo(ObjectName name)
                           throws InstanceNotFoundException,
                                  IntrospectionException,
                                  ReflectionException

  Discovers the attributes and operations that an MBean exposes for management.
  Parameters:
    `name` - The object name of the MBean
  Returns:
    A `MBeanInfo` instance which contains all attributes and operations exposed by the MBean.
  Throws:
    IntrospectionException - An exception occurs during introspection.
    InstanceNotFoundException - The MBean specified is not found.
    ReflectionException - An exception occurred when trying to invoke the getMBeanInfo of a Dynamic MBean.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD