Interface IActionFactory

All Known Implementing Classes:
DefaultActionFactory

public interface IActionFactory
Factory for producing IActions to be executed by a Schedule.
Version:
$Revision: 1.1 $ $Date: 2005/12/21 22:25:34 $
Author:
Nick Collier
See Also:
  • Method Details

    • createAction

      IAction createAction(IAction action)
      Creates an IAction to execute the specified IAction. It is acceptable to return the passed in IAction, if no other wrapping or decoration is necessary.
      Parameters:
      action - the IAction that the created IAction will execute
      Returns:
      the created IAction
    • createAction

      IAction createAction(Object target, String methodName, Object... parameters)
      Creates an IAction that will call the named method on the specified target using the specified parameters.
      Parameters:
      target - the object on which to call the name method
      methodName - the name of the method to call
      parameters - the parameters of the method
      Returns:
      an IAction that will call the named method on the specified target using the specified parameters.
    • createActionForIterable

      IAction createActionForIterable(Iterable target, String methodName, boolean shuffle, Object... parameters)
      Creates an IAction that will call the named method on each object in the specified target using the specified parameters.
      Parameters:
      target - the object on which to call the name method
      methodName - the name of the method to call
      shuffle - whether to shuffle the items in the iterable before calling the method on the objects therein
      parameters - the parameters of the method
      Returns:
      an IAction that will call the named method on the specified target using the specified parameters.
    • createAction

      IActionParameterPair createAction(Object annotatedObj, Object... parameters)
      Creates an IActionParameterPair from annotated methods in the specified annotatedObj. The IAction will execute the method whose parameters best match the specified parameters. The parameters will be passed to the method at execution.
      Parameters:
      annotatedObj - the object containing the annotated methods
      parameters - the parameters to pass to the method call and to use to find the method itself
      Returns:
      an IActionParameterPair containing the best matching IAction and its ScheduleParameters.
      See Also:
    • createActions

      List<IActionParameterPair> createActions(Object obj)
      Creates a List of IActionParameterPair-s from annotated methods. The list is created from the methods in the specified object that are annotated by the ScheduledMethod annotation.
      Parameters:
      obj - the object whose methods are annotated
      Returns:
      a List of IAction together with their scheduling parameter data created from annotated methods.
      See Also: