com.sun.jdmk
Class GenericProxy

java.lang.Object
  extended by com.sun.jdmk.GenericProxy
All Implemented Interfaces:
Proxy

Deprecated. The JMX Remote API should be used in preference to the legacy Java DMK connectors. This class may be removed in a future version of Java DMK. See JdmkLegacyConnector and CascadingProxy.

public class GenericProxy
extends Object
implements Proxy

Implementation of the GenericProxy object associated with a remote MBean.


Constructor Summary
GenericProxy(ObjectInstance instance)
          Deprecated. Constructs a GenericProxy instance.
GenericProxy(ObjectInstance instance, ProxyHandler server)
          Deprecated. Constructs a GenericProxy instance.
 
Method Summary
 Object getAttribute(String attribute)
          Deprecated. Gets the value of a specific attribute of an MBean.
 AttributeList getAttributes(String[] attributes)
          Deprecated. Gets the values of several attributes of an MBean.
 MBeanInfo getMBeanInfo()
          Deprecated. This method provides the exposed attributes and actions of the MBean.
 ObjectInstance getMBeanObjectInstance()
          Deprecated. Returns an ObjectInstance object that contains the object name (ObjectName object) and the class name of the remote MBean that this proxy MBean represents.
 ProxyHandler getServer()
          Deprecated. Returns the server to which this proxy is bound.
 Object invoke(String methodName, Object[] arguments, String[] signature)
          Deprecated. Invokes a method of an MBean.
 void setAttribute(Attribute attribute)
          Deprecated. Sets the value of a specific attribute of an MBean.
 AttributeList setAttributes(AttributeList attributes)
          Deprecated. Sets the values of several attributes of an MBean.
 void setMBeanObjectInstance(ObjectInstance instance)
          Deprecated. Sets an ObjectInstance identifying an MBean which will be represented by this proxy.
 void setServer(ProxyHandler server)
          Deprecated. Sets the server to which this proxy is bound.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericProxy

public GenericProxy(ObjectInstance instance)
Deprecated. 
Constructs a GenericProxy instance.

Parameters:
instance - The object instance identifying a MBean.

GenericProxy

public GenericProxy(ObjectInstance instance,
                    ProxyHandler server)
Deprecated. 
Constructs a GenericProxy instance.

Parameters:
instance - The object instance identifying a MBean.
server - The server to which this proxy is bound.
Method Detail

getMBeanObjectInstance

public ObjectInstance getMBeanObjectInstance()
Deprecated. 
Description copied from interface: Proxy
Returns an ObjectInstance object that contains the object name (ObjectName object) and the class name of the remote MBean that this proxy MBean represents.

Specified by:
getMBeanObjectInstance in interface Proxy

getServer

public ProxyHandler getServer()
Deprecated. 
Description copied from interface: Proxy
Returns the server to which this proxy is bound. It returns null if this proxy is not bound to any server (local or remote).

Specified by:
getServer in interface Proxy

setServer

public void setServer(ProxyHandler server)
Deprecated. 
Description copied from interface: Proxy
Sets the server to which this proxy is bound. It is allowed to set server null, that means no sever is bound to the Proxy.

Specified by:
setServer in interface Proxy

getMBeanInfo

public MBeanInfo getMBeanInfo()
                       throws InstanceNotFoundException,
                              ProxyMBeanInstantiationException,
                              ReflectionException,
                              IntrospectionException
Deprecated. 
This method provides the exposed attributes and actions of the MBean. It provides this information using an MBeanInfo object.

Returns:
An instance of MBeanInfo allowing all attributes and actions of this MBean to be retrieved.
Throws:
ProxyMBeanInstantiationException - The ProxyMBean Metadata Service could not be instantiated.
InstanceNotFoundException - The MBean specified is not registered in the MBean server.
ReflectionException - Wraps a java.lang.Exception thrown while trying to invoke the introspect method.
IntrospectionException - An exception occurs during introspection.

getAttribute

public Object getAttribute(String attribute)
                    throws AttributeNotFoundException,
                           InstanceNotFoundException,
                           MBeanException,
                           ReflectionException
Deprecated. 
Gets the value of a specific attribute of an MBean.

Parameters:
attribute - The name of the attribute to be retrieved.
Returns:
The value of the retrieved attribute. The return value can be any Java object that is serializable.
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 an exception thrown while trying to instantiate and apply the operator specified in Modification.

getAttributes

public AttributeList getAttributes(String[] attributes)
                            throws InstanceNotFoundException,
                                   ReflectionException
Deprecated. 
Gets the values of several attributes of an MBean.

Parameters:
attributes - A list of the attributes to be retrieved.
Returns:
The values of the retrieved attributes. The value of the attributes can be any Java object that is serializable.
Throws:
InstanceNotFoundException - The MBean specified is not registered in the MBean server.
ReflectionException - An exception occurred trying to invoke the getAttributes of a Dynamic MBean.

setAttribute

public void setAttribute(Attribute attribute)
                  throws InstanceNotFoundException,
                         AttributeNotFoundException,
                         InvalidAttributeValueException,
                         MBeanException,
                         ReflectionException
Deprecated. 
Sets the value of a specific attribute of an MBean.

Parameters:
attribute - The modification to be performed: The identification of the attribute to be set, the value it is to be set to, and the operator to apply. The value of the attribute can be any Java object that is serializable.
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 while trying to invoke the setter.

setAttributes

public AttributeList setAttributes(AttributeList attributes)
                            throws InstanceNotFoundException,
                                   ReflectionException
Deprecated. 
Sets the values of several attributes of an MBean.

Parameters:
attributes - A list of attributes: The identification of the attributes to be set and the values to which they are to be set. The value of the attributes can be any Java object that is serializable.
Returns:
The list of attributes that were set, with their new values. The value of the attributes can be any Java object that is serializable.
Throws:
InstanceNotFoundException - The MBean specified is not registered in the MBean server.
ReflectionException - An exception occurred trying to invoke the setAttributes of a Dynamic MBean.

invoke

public Object invoke(String methodName,
                     Object[] arguments,
                     String[] signature)
              throws InstanceNotFoundException,
                     MBeanException,
                     ReflectionException
Deprecated. 
Invokes a method of an MBean.

Parameters:
methodName - The name of the method to be invoked.
arguments - An array containing the arguments to be set when the method is invoked. An argument can be any Java object that is serializable.
signature - An array containing the signature of the method.
Returns:
The object returned by the invocation of the given method. The return value can be any Java object that is serializable.
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.

setMBeanObjectInstance

public void setMBeanObjectInstance(ObjectInstance instance)
Deprecated. 
Sets an ObjectInstance identifying an MBean which will be represented by this proxy.

Parameters:
instance - The object instance identifying a 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.