com.adventnet.services.cascading
Class RemoteProxy

java.lang.Object
  |
  +--com.adventnet.services.cascading.RemoteProxy

class RemoteProxy
extends java.lang.Object
implements DynamicMBean, MBeanRegistration


Constructor Summary
RemoteProxy(Cascader casc, ObjectName name)
           
 
Method Summary
 java.lang.Object getAttribute(java.lang.String attribute)
          Gets the value of a specific attribute of this MBean.
 AttributeList getAttributes(java.lang.String[] attributes)
          Enables the values of several attributes of this MBean.
 MBeanInfo getMBeanInfo()
          This method discovers the attributes and operations this MBean exposes for management.
 java.lang.String getObjectName()
          Returns the ObjectName of this RemoteProxy with which it has been registered with the MBeanServer.
 java.lang.Object invoke(java.lang.String actionName, java.lang.Object[] params, java.lang.String[] signature)
          Invokes an action on the original MBean associated with this MBean.
 void postDeregister()
          Allows this MBean to perform any operations needed after having been de-registered in the MBeanServer.
 void postRegister(java.lang.Boolean registrationDone)
          Allows this MBean to perform any operations needed after having been registered in the MBeanServer or after the registration has failed.
 void preDeregister()
          Allows this MBean to perform any operations it needs before being de-registered by the MBeanServer.
 ObjectName preRegister(MBeanServer server, ObjectName name)
          Allows the MBean to perform any operations it needs before being registered in the MBeanServer.
 void setAttribute(Attribute attribute)
          Sets the value of a specific attribute of this MBean.
 AttributeList setAttributes(AttributeList attributes)
          Sets the values of several attributes of this MBean.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteProxy

public RemoteProxy(Cascader casc,
                   ObjectName name)
Method Detail

getMBeanInfo

public MBeanInfo getMBeanInfo()
This method discovers the attributes and operations this MBean exposes for management.
Specified by:
getMBeanInfo in interface DynamicMBean
Returns:
An instance of MBeanInfo allowing to retrieve all attributes and operations of this MBean.

getAttribute

public java.lang.Object getAttribute(java.lang.String attribute)
                              throws AttributeNotFoundException,
                                     MBeanException,
                                     ReflectionException
Gets the value of a specific attribute of this MBean.
Specified by:
getAttribute in interface DynamicMBean
Parameters:
attribute - A String specifying the name of the attribute to be retrieved.
Returns:
The value of the retrieved attribute.
Throws:
AttributeNotFoundException - The specified attribute is not accessible in the MBean.
MBeanException - Wraps an exception thrown by the MBean's setter.
ReflectionException - Wraps an java.lang.Exception thrown while trying to invoke the setter.

getAttributes

public AttributeList getAttributes(java.lang.String[] attributes)
Enables the values of several attributes of this MBean.
Specified by:
getAttributes in interface DynamicMBean
Parameters:
attributes - A list of attributes to be retrieved.
Returns:
The value of the retrieved attributes as attributeList.

invoke

public java.lang.Object invoke(java.lang.String actionName,
                               java.lang.Object[] params,
                               java.lang.String[] signature)
                        throws MBeanException,
                               ReflectionException
Invokes an action on the original MBean associated with this MBean.
Specified by:
invoke in interface DynamicMBean
Parameters:
actionName - The name of the action to be invoked.
params - An array containing the parameters to be set when the action is invoked
signature - An array containing the signature of the action. The class objects will be loaded using the same class loader as the one used for loading the MBean on which the action was invoked.
Returns:
The object returned by the action, which represents the result ofinvoking the action on the specified MBean.
Throws:
MBeanException - Wraps an exception thrown by the MBean's setter.
ReflectionException - Wraps an java.lang.Exception thrown while trying to invoke the setter.

setAttribute

public void setAttribute(Attribute attribute)
                  throws AttributeNotFoundException,
                         InvalidAttributeValueException,
                         MBeanException,
                         ReflectionException
Sets the value of a specific attribute of this MBean.
Specified by:
setAttribute in interface DynamicMBean
Parameters:
attribute - The identification of the attribute to be set and the value it is to be set to.
Throws:
AttributeNotFoundException - The specified attribute is not accessible in the MBean.
InvalidAttributeValueException - The specified value for the attribute is not valid.
MBeanException - Wraps an exception thrown by the MBean's setter.
ReflectionException - Wraps an java.lang.Exception thrown while 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(AttributeList attributes)
Sets the values of several attributes of this MBean.
Specified by:
setAttributes in interface DynamicMBean
Parameters:
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.

getObjectName

public java.lang.String getObjectName()
Returns the ObjectName of this RemoteProxy with which it has been registered with the MBeanServer.
Returns:
the ObjectName

preRegister

public ObjectName preRegister(MBeanServer server,
                              ObjectName name)
                       throws java.lang.Exception
Allows the MBean to perform any operations it needs before being registered in the MBeanServer. If the name of the MBean is not specified, the MBean can provide a name for its registration. If any exception is raised, the MBean will not be registered in the MBeanServer.
Specified by:
preRegister in interface MBeanRegistration
Parameters:
server - The MBeanServer in which the MBean will be registered.
name - The object name of the MBean.
Returns:
The name of the MBean registered.
Throws:
java.lang.Exception - - This exception should be caught by the MBeanServer and re-thrown as an MBeanRegistrationException.

postRegister

public void postRegister(java.lang.Boolean registrationDone)
Allows this MBean to perform any operations needed after having been registered in the MBeanServer or after the registration has failed.
Specified by:
postRegister in interface MBeanRegistration
Parameters:
registrationDone - Indicates whether or not the MBean has been successfully registered in the MBeanServer. The value false means that either the registration phase has failed.

preDeregister

public void preDeregister()
                   throws java.lang.Exception
Allows this MBean to perform any operations it needs before being de-registered by the MBeanServer.
Specified by:
preDeregister in interface MBeanRegistration
Throws:
java.langException - This exception should be caught by the MBeanServer and re-thrown as an MBeanRegistrationException.

postDeregister

public void postDeregister()
Allows this MBean to perform any operations needed after having been de-registered in the MBeanServer.
Specified by:
postDeregister in interface MBeanRegistration