Class AbstractTask

  • All Implemented Interfaces:
    com.rapiddweller.common.ThreadAware, Task, java.io.Closeable, java.lang.AutoCloseable
    Direct Known Subclasses:
    CompositeTask, FileDeleter, FileJoiner, RunnableTask, TaskProxy

    public abstract class AbstractTask
    extends java.lang.Object
    implements Task
    Simple abstract implementation of the Task interface.

    Created: 16.07.2007 18:55:16
    Since:
    0.2
    Author:
    Volker Bergmann
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.String taskName
      The Task name.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected AbstractTask()
      Instantiates a new Abstract task.
      protected AbstractTask​(java.lang.String taskName)
      Instantiates a new Abstract task.
      protected AbstractTask​(java.lang.String taskName, boolean threadSafe, boolean parallelizable)
      Instantiates a new Abstract task.
    • Field Detail

      • taskName

        protected java.lang.String taskName
        The Task name.
    • Constructor Detail

      • AbstractTask

        protected AbstractTask()
        Instantiates a new Abstract task.
      • AbstractTask

        protected AbstractTask​(java.lang.String taskName)
        Instantiates a new Abstract task.
        Parameters:
        taskName - the task name
      • AbstractTask

        protected AbstractTask​(java.lang.String taskName,
                               boolean threadSafe,
                               boolean parallelizable)
        Instantiates a new Abstract task.
        Parameters:
        taskName - the task name
        threadSafe - the thread safe
        parallelizable - the parallelizable
    • Method Detail

      • getTaskName

        public java.lang.String getTaskName()
        Description copied from interface: Task
        Gets task name.
        Specified by:
        getTaskName in interface Task
        Returns:
        the name of the task.
      • setTaskName

        public void setTaskName​(java.lang.String taskName)
        Sets task name.
        Parameters:
        taskName - the task name
      • isThreadSafe

        public boolean isThreadSafe()
        Specified by:
        isThreadSafe in interface com.rapiddweller.common.ThreadAware
      • isParallelizable

        public boolean isParallelizable()
        Specified by:
        isParallelizable in interface com.rapiddweller.common.ThreadAware
      • pageFinished

        public void pageFinished()
        Description copied from interface: Task
        Page finished.
        Specified by:
        pageFinished in interface Task
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Specified by:
        close in interface Task
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object