Class AbstractTaskMonitor

java.lang.Object
net.thevpc.common.mon.AbstractTaskMonitor
All Implemented Interfaces:
TaskMonitor
Direct Known Subclasses:
AbstractProgressMonitor

public abstract class AbstractTaskMonitor extends Object implements TaskMonitor
  • Field Details

  • Constructor Details

    • AbstractTaskMonitor

      public AbstractTaskMonitor(long id)
  • Method Details

    • nextId

      public static long nextId()
    • setStartedImpl

      protected void setStartedImpl()
    • start

      public void start()
      Specified by:
      start in interface TaskMonitor
    • terminate

      public void terminate()
      Specified by:
      terminate in interface TaskMonitor
    • terminate

      protected void terminate(boolean terminated)
    • cancel

      public void cancel()
      Specified by:
      cancel in interface TaskMonitor
    • resume

      public void resume()
      Specified by:
      resume in interface TaskMonitor
    • suspend

      public void suspend()
      Specified by:
      suspend in interface TaskMonitor
    • isSuspended

      public boolean isSuspended()
      Specified by:
      isSuspended in interface TaskMonitor
    • isTerminated

      public boolean isTerminated()
      Specified by:
      isTerminated in interface TaskMonitor
    • isBlocked

      public boolean isBlocked()
      Specified by:
      isBlocked in interface TaskMonitor
    • setBlocked

      public void setBlocked(boolean blocked)
      Specified by:
      setBlocked in interface TaskMonitor
    • isStarted

      public boolean isStarted()
      Specified by:
      isStarted in interface TaskMonitor
    • isCanceled

      public boolean isCanceled()
      Specified by:
      isCanceled in interface TaskMonitor
    • reset

      public void reset()
      Specified by:
      reset in interface TaskMonitor
    • getId

      public long getId()
      Specified by:
      getId in interface TaskMonitor
    • getName

      public String getName()
      Specified by:
      getName in interface TaskMonitor
    • setName

      protected void setName(String name)
    • getDesc

      public String getDesc()
      Specified by:
      getDesc in interface TaskMonitor
    • setDesc

      protected void setDesc(String desc)
    • addListener

      public void addListener(TaskListener listener)
      Specified by:
      addListener in interface TaskMonitor
    • removeListener

      public void removeListener(TaskListener listener)
      Specified by:
      removeListener in interface TaskMonitor
    • getListeners

      public TaskListener[] getListeners()
      Specified by:
      getListeners in interface TaskMonitor
    • getDuration

      public long getDuration()
      Specified by:
      getDuration in interface TaskMonitor
    • getStartTime

      public long getStartTime()
      Specified by:
      getStartTime in interface TaskMonitor
    • setBlockedImpl

      protected void setBlockedImpl(boolean blocked)
    • startImpl

      protected void startImpl()
    • terminateImpl

      protected void terminateImpl(boolean terminated)
    • cancelImpl

      protected void cancelImpl()
    • resumeImpl

      protected void resumeImpl()
    • suspendImpl

      protected void suspendImpl()
    • resetImpl

      protected void resetImpl()
    • setMessage

      public final void setMessage(Message message)
      Specified by:
      setMessage in interface TaskMonitor
    • setMessage

      public final void setMessage(String message)
      Specified by:
      setMessage in interface TaskMonitor
    • setMessage

      public void setMessage(String message, Object... args)
      Specified by:
      setMessage in interface TaskMonitor
    • setMessageImpl

      protected abstract void setMessageImpl(Message message)