Class RunnableWithLogging

    • Field Detail

      • m_Stopped

        protected boolean m_Stopped
        whether the runnable has been stopped.
      • m_Running

        protected boolean m_Running
        whether the runnable is still running.
    • Constructor Detail

      • RunnableWithLogging

        public RunnableWithLogging()
    • Method Detail

      • preRun

        protected void preRun()
        Hook method before the run is started.

        Default implementation does nothing.
      • doRun

        protected abstract void doRun()
        Performs the actual execution.
      • postRun

        protected void postRun()
        Hook method after the run finished.

        Default implementation does nothing.
      • run

        public void run()
        Starts the execution.
        Specified by:
        run in interface Runnable
      • stopExecution

        public void stopExecution()
        Stops the execution.
        Specified by:
        stopExecution in interface Stoppable
      • isStopped

        public boolean isStopped()
        Returns whether the runnable has been stopped.
        Specified by:
        isStopped in interface StoppableWithFeedback
        Returns:
        true if stopped
      • isRunning

        public boolean isRunning()
        Returns whether the runnable is still running.
        Returns:
        true if still running