Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.jbossmx.cluster.watchdog.mbean.watchdog
Class InvokeMethodCorrectiveAction  view InvokeMethodCorrectiveAction download InvokeMethodCorrectiveAction.java

java.lang.Object
  extended byorg.jbossmx.cluster.watchdog.mbean.watchdog.BaseCorrectiveAction
      extended byorg.jbossmx.cluster.watchdog.mbean.watchdog.InvokeMethodCorrectiveAction
All Implemented Interfaces:
java.lang.Cloneable, CorrectiveAction

public class InvokeMethodCorrectiveAction
extends BaseCorrectiveAction

CorrectiveAction for invoking methods on mbeans


Field Summary
private  java.lang.Object m_desiredResult
          The result desired from invoking the method on the MBean
private  java.lang.String m_methodName
          The MBean method name to invoke
private  java.lang.Object[] m_parameters
          The parameters to use when invoking
private  java.lang.String[] m_signature
          The signature of the method to invoke
 
Fields inherited from class org.jbossmx.cluster.watchdog.mbean.watchdog.BaseCorrectiveAction
 
Constructor Summary
InvokeMethodCorrectiveAction(java.lang.String methodName, java.lang.Object[] parameters, java.lang.String[] signature, java.lang.Object desiredResult)
          Constructor for InvokeMethodCorrectiveAction
 
Method Summary
protected  boolean applyImpl()
          Apply the InvokeMethodCorrectiveAction, retrieves the MBeanServer and ObjectName from the CorrectiveActionContext.
private  boolean isOveridingCallScriptCorrectiveAction(CorrectiveAction correctiveAction)
          Returns whether correctiveAction is a CallScriptCorrectiveAction which has been set to override InvokeMethodCorrectiveAction
 boolean isOverridenBy(CorrectiveAction correctiveAction)
          Returns whether this CorrectiveAction is overriden by correctiveAction
private  boolean matchesDesiredResult(java.lang.Object result)
          Returns whether result matches the desired result set during construction
 
Methods inherited from class org.jbossmx.cluster.watchdog.mbean.watchdog.BaseCorrectiveAction
apply, canApply, clone, getCorrectiveActionContext, getNumberOfTimesToApply, isOverridenBy, setCorrectiveActionContext, setNumberOfTimesToApply
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_methodName

private java.lang.String m_methodName
The MBean method name to invoke


m_parameters

private java.lang.Object[] m_parameters
The parameters to use when invoking


m_signature

private java.lang.String[] m_signature
The signature of the method to invoke


m_desiredResult

private java.lang.Object m_desiredResult
The result desired from invoking the method on the MBean

Constructor Detail

InvokeMethodCorrectiveAction

public InvokeMethodCorrectiveAction(java.lang.String methodName,
                                    java.lang.Object[] parameters,
                                    java.lang.String[] signature,
                                    java.lang.Object desiredResult)
Constructor for InvokeMethodCorrectiveAction

Method Detail

applyImpl

protected boolean applyImpl()
                     throws java.lang.Exception
Apply the InvokeMethodCorrectiveAction, retrieves the MBeanServer and ObjectName from the CorrectiveActionContext. Then invokes the method specified during construction.

Specified by:
applyImpl in class BaseCorrectiveAction

isOverridenBy

public boolean isOverridenBy(CorrectiveAction correctiveAction)
Returns whether this CorrectiveAction is overriden by correctiveAction


isOveridingCallScriptCorrectiveAction

private boolean isOveridingCallScriptCorrectiveAction(CorrectiveAction correctiveAction)
Returns whether correctiveAction is a CallScriptCorrectiveAction which has been set to override InvokeMethodCorrectiveAction


matchesDesiredResult

private boolean matchesDesiredResult(java.lang.Object result)
Returns whether result matches the desired result set during construction