org.jactr.core.runtime.controller
Class OldController

java.lang.Object
  extended by org.jactr.core.runtime.controller.OldController

public class OldController
extends java.lang.Object

Author:
developer

Constructor Summary
OldController()
           
 
Method Summary
 void attach()
          attach this controller to the runtime.
 void detach()
          detach from the runtime.
 java.util.Collection<IModel> getRunningModels()
          return all the models that are currently running
 java.util.Collection<IModel> getSuspendedModels()
          return all the models that are suspended
 java.util.Collection<IModel> getTerminatedModels()
          return all the models that have termianted
 boolean isRunning()
           
 boolean isSuspended()
           
 void reset()
          reset a competed runtime to its prefrun state
 void resume()
          request that a suspended runtime resume
 void setSuspendImmediately(boolean suspendImmediately)
          if true, after start() is called, the models will immediately suspend
 void start()
           
 void start(boolean suspendImmediately)
          this will fire the onStart if present, signal the start of the runtime and then start the models
 void stop()
          request that everyone stop.
 void suspend()
          request that everyone suspend
 java.util.concurrent.Future<java.lang.Boolean> terminate()
           
 void waitForCompletion()
           
 void waitForResumption()
           
 void waitForStart()
           
 void waitForSuspension()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OldController

public OldController()
Method Detail

setSuspendImmediately

public final void setSuspendImmediately(boolean suspendImmediately)
if true, after start() is called, the models will immediately suspend

Parameters:
suspendImmediately -

getRunningModels

public final java.util.Collection<IModel> getRunningModels()
return all the models that are currently running

See Also:
IController.getRunningModels()

getSuspendedModels

public final java.util.Collection<IModel> getSuspendedModels()
return all the models that are suspended

See Also:
IController.getSuspendedModels()

getTerminatedModels

public final java.util.Collection<IModel> getTerminatedModels()
return all the models that have termianted

See Also:
IController.getTerminatedModels()

isRunning

public final boolean isRunning()
See Also:
IController.isRunning()

isSuspended

public final boolean isSuspended()
See Also:
IController.isSuspended()

reset

public final void reset()
reset a competed runtime to its prefrun state

See Also:
org.jactr.core.runtime.controller.IController#reset()

resume

public final void resume()
request that a suspended runtime resume

See Also:
IController.resume()

attach

public void attach()
attach this controller to the runtime. called by ACRRuntime.setController() If you override, please call super.attach()

See Also:
IController.attach()

detach

public void detach()
detach from the runtime. if you override, please call super.detach()

See Also:
IController.detach()

start

public final void start()
See Also:
IController.start()

start

public final void start(boolean suspendImmediately)
this will fire the onStart if present, signal the start of the runtime and then start the models

See Also:
IController.start(boolean)

stop

public final void stop()
request that everyone stop.

See Also:
IController.stop()

terminate

public java.util.concurrent.Future<java.lang.Boolean> terminate()

suspend

public final void suspend()
request that everyone suspend

See Also:
IController.suspend()

waitForCompletion

public final void waitForCompletion()
                             throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException
See Also:
IController.waitForCompletion()

waitForResumption

public final void waitForResumption()
                             throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException
See Also:
IController.waitForResumption()

waitForSuspension

public final void waitForSuspension()
                             throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException
See Also:
IController.waitForSuspension()

waitForStart

public final void waitForStart()
                        throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException