org.jactr.core.runtime.controller
Interface IController

All Known Subinterfaces:
IDebugController
All Known Implementing Classes:
DebugController, DefaultController

public interface IController

Controls the behavior of the ACTRRuntime


Method Summary
 void attach()
          attach to the runtime - called by the runtime during ACTRRuntime.setController();
 java.util.concurrent.Future<java.lang.Boolean> complete()
          complete().get() will block until completeds
 void detach()
          detach the runtime - called by the runtime during ACTRRuntime.setController(null);
 java.util.Collection<IModel> getRunningModels()
           
 java.util.Collection<IModel> getSuspendedModels()
           
 java.util.Collection<IModel> getTerminatedModels()
           
 boolean isRunning()
           
 boolean isSuspended()
           
 java.util.concurrent.Future<java.lang.Boolean> resume()
          resume from a suspend
 java.util.concurrent.Future<java.lang.Boolean> start()
          run the models..The runtime is not actually running until at least one model has finished initialization.
 java.util.concurrent.Future<java.lang.Boolean> start(boolean suspendImmediately)
          start the models but suspend at the start of the first cycle
 java.util.concurrent.Future<java.lang.Boolean> stop()
          stop all the current running models at the nearest possible moment.
 java.util.concurrent.Future<java.lang.Boolean> suspend()
          pause at the next immediate opportunity
 java.util.concurrent.Future<java.lang.Boolean> terminate()
          force all the models to terminate
 java.util.concurrent.Future<java.lang.Boolean> waitForCompletion()
           
 java.util.concurrent.Future<java.lang.Boolean> waitForResumption()
           
 java.util.concurrent.Future<java.lang.Boolean> waitForStart()
          returns a future that can be blocked on until the runtime starts fully (i.e.
 java.util.concurrent.Future<java.lang.Boolean> waitForSuspension()
           
 

Method Detail

attach

void attach()
attach to the runtime - called by the runtime during ACTRRuntime.setController();


detach

void detach()
detach the runtime - called by the runtime during ACTRRuntime.setController(null);


start

java.util.concurrent.Future<java.lang.Boolean> start()
run the models..The runtime is not actually running until at least one model has finished initialization.


waitForStart

java.util.concurrent.Future<java.lang.Boolean> waitForStart()
returns a future that can be blocked on until the runtime starts fully (i.e. a model is running)

Returns:

start

java.util.concurrent.Future<java.lang.Boolean> start(boolean suspendImmediately)
start the models but suspend at the start of the first cycle

Parameters:
suspendImmediately -

complete

java.util.concurrent.Future<java.lang.Boolean> complete()
complete().get() will block until completeds

Returns:

waitForCompletion

java.util.concurrent.Future<java.lang.Boolean> waitForCompletion()

stop

java.util.concurrent.Future<java.lang.Boolean> stop()
stop all the current running models at the nearest possible moment. This is a clean stop.


terminate

java.util.concurrent.Future<java.lang.Boolean> terminate()
force all the models to terminate


suspend

java.util.concurrent.Future<java.lang.Boolean> suspend()
pause at the next immediate opportunity


waitForSuspension

java.util.concurrent.Future<java.lang.Boolean> waitForSuspension()

resume

java.util.concurrent.Future<java.lang.Boolean> resume()
resume from a suspend


waitForResumption

java.util.concurrent.Future<java.lang.Boolean> waitForResumption()

isRunning

boolean isRunning()

isSuspended

boolean isSuspended()

getRunningModels

java.util.Collection<IModel> getRunningModels()

getTerminatedModels

java.util.Collection<IModel> getTerminatedModels()

getSuspendedModels

java.util.Collection<IModel> getSuspendedModels()