com.tibbo.aggregate.common.action

## Class SequentialAction<I extends InitialRequest,C extends ActionCommand,R extends ActionResponse>

- java.lang.Object
- - com.tibbo.aggregate.common.action.SequentialAction<I,C,R>

- All Implemented Interfaces:
    Action<I,C,R>
  Direct Known Subclasses:
    SingleThreadAction

      public abstract class SequentialAction<I extends InitialRequest,C extends ActionCommand,R extends ActionResponse>
      extends java.lang.Object
      implements Action<I,C,R>

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SequentialAction()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected abstract ActionResult` | `invoke(I parameters)` Override this method to provide action functionality.
    `protected abstract R` | `send(C actionCommand)` Action Implementations should override this method to provide command sending functionality to client.
    `abstract C` | `service(R actionRequest)` Action Implementations should override this method to convert request-response style processing to a continuous instruction flow in execute method.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface com.tibbo.aggregate.common.action.Action

      `destroy, init`

- - ### Constructor Detail

    - #### SequentialAction

          public SequentialAction()

  - ### Method Detail

    - #### invoke

          protected abstract ActionResult invoke(I parameters)
                                          throws ContextException

      Override this method to provide action functionality.
      Throws:
        `ContextException`

    - #### send

          protected abstract R send(C actionCommand)
                             throws DisconnectionException

      Action Implementations should override this method to provide command sending functionality to client.
      Throws:
        `java.lang.IllegalStateException` - If the method is called not in actionRequest processing phase
        `java.lang.NullPointerException` - If actionCommand is null
        `DisconnectionException`

    - #### service

          public abstract C service(R actionRequest)
                             throws java.lang.IllegalArgumentException

      Action Implementations should override this method to convert request-response style processing to a continuous instruction flow in execute method.
      Specified by:
        `service` in interface `Action<I extends InitialRequest,C extends ActionCommand,R extends ActionResponse>`
      Throws:
        `java.lang.IllegalArgumentException` - if actionRequest doesn't match previous actionCommand or first actionRequest received isn't instance of ActionInitParameters