Class RunnableAgent

  • All Implemented Interfaces:
    Agent

    public abstract class RunnableAgent
    extends Object
    implements Agent
    • Constructor Detail

      • RunnableAgent

        public RunnableAgent​(Runnable runnable)
    • Method Detail

      • run

        protected abstract Runnable run​(Runnable runnable)
        This method is used to run the task and return a Runnable to cancel it
        Parameters:
        runnable - the task to run
        Returns:
        the Runnable to cancel the task
      • start

        public void start()
        Specified by:
        start in interface Agent
      • stop

        public void stop()
        Specified by:
        stop in interface Agent