Class DelegatorCommand<InputType>

java.lang.Object
org.chenile.owiz.impl.CommandBase<InputType>
org.chenile.owiz.impl.DelegatorCommand<InputType>
Type Parameters:
InputType -
All Implemented Interfaces:
BypassableCommand<InputType>, Command<InputType>, OrchestrationAware<InputType>

public class DelegatorCommand<InputType> extends CommandBase<InputType>
This Command delegates control to a method of an underlying object whose reference is passed to this command. This can be useful for trivial delegations.
  • Field Details

  • Constructor Details

    • DelegatorCommand

      public DelegatorCommand()
  • Method Details

    • getBeanFactoryAdapter

      public BeanFactoryAdapter getBeanFactoryAdapter()
    • setBeanFactoryAdapter

      public void setBeanFactoryAdapter(BeanFactoryAdapter beanFactoryAdapter)
    • getMethodName

      public String getMethodName()
    • setMethodName

      public void setMethodName(String methodName)
    • getUnderlyingObject

      public Object getUnderlyingObject()
    • setUnderlyingObject

      public void setUnderlyingObject(Object underlyingObject)
    • doExecute

      protected void doExecute(InputType context) throws Exception
      Specified by:
      doExecute in class CommandBase<InputType>
      Throws:
      Exception
    • getMethod

      protected Method getMethod(Object delegateObject, String meth, InputType context)
      we don't know what is the signature since the arg type is unknown. So find the first one arg method we assume that is the one.
      Parameters:
      delegateObject - .
      meth - .
      context - .
      Returns:
      .