Class StateTrackingTaskProxy<E extends Task>

  • Type Parameters:
    E - the type parameter
    All Implemented Interfaces:
    com.rapiddweller.common.MessageHolder, com.rapiddweller.common.ThreadAware, Task, java.io.Closeable, java.lang.AutoCloseable, java.lang.Cloneable

    public class StateTrackingTaskProxy<E extends Task>
    extends TaskProxy<E>
    Task proxy that remembers the result of the last execution step and provides it as property available.

    Created: 05.02.2010 10:41:55
    Since:
    0.6
    Author:
    Volker Bergmann
    • Field Detail

      • state

        protected volatile TaskResult state
        The State.
    • Constructor Detail

      • StateTrackingTaskProxy

        public StateTrackingTaskProxy​(E realTask)
        Instantiates a new State tracking task proxy.
        Parameters:
        realTask - the real task
    • Method Detail

      • isAvailable

        public boolean isAvailable()
        Is available boolean.
        Returns:
        the boolean
      • execute

        public TaskResult execute​(com.rapiddweller.common.Context context,
                                  com.rapiddweller.common.ErrorHandler errorHandler)
        Description copied from interface: Task
        Executes the task's work, possibly interacting with the context.
        Specified by:
        execute in interface Task
        Overrides:
        execute in class TaskProxy<E extends Task>
        Parameters:
        context - the context
        errorHandler - the error handler
        Returns:
        the task result