com.sun.jdmk
Interface ProxyHandler

All Superinterfaces:
NotificationRegistration
All Known Subinterfaces:
MBeanInterceptor, MBeanServerInt, MBeanServerInterceptor, RemoteMBeanServer
All Known Implementing Classes:
CompatibleMBeanInterceptor, DefaultMBeanInterceptor, DefaultMBeanServerInterceptor, ForwardingMBeanServerInterceptor, GenericHttpConnectorClient, HttpConnectorClient, HttpsConnectorClient, MBeanInterceptorWrapper, MBeanServerImpl, MBeanServerInterceptorWrapper, RmiConnectorClient

Deprecated. MBean proxies should be generated using MBeanServerInvocationHandler.newProxyInstance. The interface ProxyHandler may be removed in a future version of Java DMK.

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 run at remote or local MBean server side without modifying its code.


Method Summary
 Object getAttribute(ObjectName name, String attribute)
          Deprecated. Gets the value of a specific attribute of an MBean
 AttributeList getAttributes(ObjectName name, String[] attributes)
          Deprecated. Gets a set of attributes in an MBean.
 MBeanInfo getMBeanInfo(ObjectName name)
          Deprecated. Discovers the attributes and operations that an MBean exposes for management.
 Object invoke(ObjectName name, String operationName, Object[] params, String[] signature)
          Deprecated. Invokes an operation on an MBean.
 void setAttribute(ObjectName name, Attribute attribute)
          Deprecated. Sets a specific attribute in an MBean.
 AttributeList setAttributes(ObjectName name, AttributeList attributes)
          Deprecated. Sets a set of attributes in an MBean.
 void unregisterMBean(ObjectName name)
          Deprecated. Unregisters an MBean from the MBean server.
 
Methods inherited from interface com.sun.jdmk.NotificationRegistration
addNotificationListener, removeNotificationListener
 

Method Detail

unregisterMBean

void unregisterMBean(ObjectName name)
                     throws InstanceNotFoundException,
                            MBeanRegistrationException
Deprecated. 
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

Object getAttribute(ObjectName name,
                    String attribute)
                    throws MBeanException,
                           AttributeNotFoundException,
                           InstanceNotFoundException,
                           ReflectionException
Deprecated. 
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

AttributeList getAttributes(ObjectName name,
                            String[] attributes)
                            throws InstanceNotFoundException,
                                   ReflectionException
Deprecated. 
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

void setAttribute(ObjectName name,
                  Attribute attribute)
                  throws InstanceNotFoundException,
                         AttributeNotFoundException,
                         InvalidAttributeValueException,
                         MBeanException,
                         ReflectionException
Deprecated. 
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

AttributeList setAttributes(ObjectName name,
                            AttributeList attributes)
                            throws InstanceNotFoundException,
                                   ReflectionException
Deprecated. 
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

Object invoke(ObjectName name,
              String operationName,
              Object[] params,
              String[] signature)
              throws InstanceNotFoundException,
                     MBeanException,
                     ReflectionException
Deprecated. 
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 of invoking 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

MBeanInfo getMBeanInfo(ObjectName name)
                       throws InstanceNotFoundException,
                              IntrospectionException,
                              ReflectionException
Deprecated. 
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.

Open Source build 02
opendmk-1.0-b02 2007.10.01_19:17:46_MEST

Copyright 1998-2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.