Package samer.tools

Class RThread

  • java.lang.Object
    • Viewable
      • samer.tools.RThread
  • All Implemented Interfaces:
    java.lang.Runnable


    public class RThread
    extends Viewable
    implements java.lang.Runnable
    frame rate regulator
    • Constructor Detail

      • RThread

        public RThread()
      • RThread

        public RThread(Task r)
    • Method Detail

      • onFinish

        public Task onFinish(Task t)
      • getViewer

        public Viewer getViewer()
      • dispose

        public void dispose()
      • getTask

        public Task getTask()
      • setTask

        public void setTask(Task t)
      • interrupt

        public void interrupt()
      • join

        public void join()
      • start

        public void start()
      • start

        public void start(int n)
      • kill

        public void kill()
        Important: this method BLOCKS until the thread co-operatively terminates, either naturally or by not handling the InterruptedException that will be thrown by the checkpoint() method the next time it is called.
      • setPriority

        public void setPriority(double p)
      • pause

        public void pause()
      • unpause

        public void unpause()
      • checkpoint

        public final void checkpoint()
                              throws RThread.Kill
        This method blocks if the thread has been paused and throws an InterruptedException if the thread has been killed.
        Throws:
        RThread.Kill
      • run

        public void run()
        Specified by:
        run in interface java.lang.Runnable
      • fps

        public double fps()
      • elapsedTime

        public double elapsedTime()
      • iterations

        public long iterations()
      • setRate

        public void setRate(double r)
      • regulate

        public void regulate()
      • deregulate

        public void deregulate()
      • reset

        public void reset()
      • tock

        public void tock()
      • getCommands

        public void getCommands(Agent.Registry r)
      • execute

        public void execute(java.lang.String c,
                            Environment env)
                     throws java.lang.Exception
        Throws:
        java.lang.Exception