com.adventnet.adaptors.snmp
Class RequiredModelMBeanExt

java.lang.Object
  |
  +--javax.management.modelmbean.RequiredModelMBean
        |
        +--com.adventnet.adaptors.snmp.RequiredModelMBeanExt

public class RequiredModelMBeanExt
extends RequiredModelMBean


Inner classes inherited from class javax.management.modelmbean.RequiredModelMBean
RequiredModelMBean.UpdateTimer
 
Fields inherited from class javax.management.modelmbean.RequiredModelMBean
adsValueTable, attrbroadcaster, attrFilterMapTable, clazz, confDirName, confFile, confFileName, confFileTable, mbeanInfo, notifbroadcaster, notiffields1, notiffields2, object, objectType, prints, registered
 
Constructor Summary
RequiredModelMBeanExt()
          Constructs an RequiredModelMBeanExt with an empty ModelMBeanInfo.
RequiredModelMBeanExt(ModelMBeanInfo mbi)
          Constructs a RequiredModelMBeanExt object using ModelMBeanInfo passed in.
 
Method Summary
 java.lang.Object invoke(java.lang.String actionName, java.lang.Object[] params, java.lang.String[] signature)
          Invokes a method on or through a RequiredModelMBean and returns the result of the method execution.
 
Methods inherited from class javax.management.modelmbean.RequiredModelMBean
addAttributeChangeNotificationListener, addNotificationListener, getAttribute, getAttribute, getAttributes, getClassLoaderRepository, getMBeanInfo, getNotificationInfo, load, postDeregister, postRegister, preDeregister, preRegister, removeAttributeChangeNotificationListener, removeAttributeChangeNotificationListener, removeNotificationListener, removeNotificationListener, sendAttributeChangeNotification, sendAttributeChangeNotification, sendNotification, sendNotification, setAttribute, setAttributes, setManagedResource, setModelMBeanInfo, store
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RequiredModelMBeanExt

public RequiredModelMBeanExt()
                      throws MBeanException,
                             RuntimeOperationsException
Constructs an RequiredModelMBeanExt with an empty ModelMBeanInfo. After the RequiredModelMBeanExt's MBeanInfo and Descriptors are customized, the RequiredModelMBeanExt should be registered with the MBeanServer.
Throws:
MBeanException - The constructor of the object has thrown an exception.
RuntimeOperationsException - - Wraps an IllegalArgumentException

RequiredModelMBeanExt

public RequiredModelMBeanExt(ModelMBeanInfo mbi)
                      throws MBeanException,
                             RuntimeOperationsException
Constructs a RequiredModelMBeanExt object using ModelMBeanInfo passed in. The RequiredModelMBeanExt must be instantiated, but not registered with the MBeanServer. After the RequiredModelMBeanExt's MBeanInfo and Descriptors are customized, the RequiredModelMBeanExt should be registered with the MBeanServer.
Parameters:
mbi - The ModelMBeanInfo object to be used by the RequiredModelMBeanExt.
Throws:
MBeanException - The constructor of the object has thrown an exception.
RuntimeOperationsException - Wraps an IllegalArgumentException : The MBeanInfo passed in parameter is null or invalid.
Method Detail

invoke

public java.lang.Object invoke(java.lang.String actionName,
                               java.lang.Object[] params,
                               java.lang.String[] signature)
                        throws MBeanException,
                               ReflectionException
Description copied from class: RequiredModelMBean
Invokes a method on or through a RequiredModelMBean and returns the result of the method execution.

If the given method to be invoked, together with the provided signature, matches one of RequiredModelMbean accessible methods, this one will be call. Otherwise the call to the given method will be tried on the managed ressource.

The last value returned by an operation may be cached in the operation's descriptor which is in the ModelMBeanOperationInfo's descriptor. The valid value will be in the 'value' field if there is one. If the 'currencyTimeLimit' field in the descriptor is:

Overrides:
invoke in class RequiredModelMBean
Tags copied from class: RequiredModelMBean
Parameters:
opName - The name of the method to be invoked. The name can be the fully qualified method name including the classname, or just the method name if the classname is defined in the 'class' field of the operation descriptor.
opArgs - An array containing the parameters to be set when the operation is invoked
sig - 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 method, which represents the result of invoking the method on the specified managed resource.
Throws:
MBeanException - Wraps one of the following Exceptions:
  • An Exception thrown by the managed object's invoked method.
  • ServiceNotFoundException: No ModelMBeanOperationInfo or no descriptor defined for the specified operation or the managed resource is null.
  • InvalidTargetObjectTypeException: The 'targetType' field value is not 'objectReference'.
ReflectionException - Wraps an Exception thrown while trying to invoke the method.
RuntimeOperationsException - Wraps an IllegalArgumentException Method name is null.