sk.robotics.rlcs.agentspace
Class Scheduler

java.lang.Object
  extended by sk.robotics.rlcs.agentspace.Agent
      extended by sk.robotics.rlcs.agentspace.Scheduler
All Implemented Interfaces:
java.lang.Runnable

public class Scheduler
extends Agent

Agent scheduler. While beeing an agent itself, manages other running agents.


Nested Class Summary
static class Scheduler.Cfg
          Configuration - set of currently running agents.
 
Nested classes/interfaces inherited from class sk.robotics.rlcs.agentspace.Agent
Agent.AgentThread, Agent.Hidden, Agent.ThreadCreator, Agent.WorkerThreadGroup
 
Field Summary
 
Fields inherited from class sk.robotics.rlcs.agentspace.Agent
logTimeFormat, space, thread, workerThreads
 
Method Summary
 Scheduler.Cfg getCurrentConfig()
           
static Scheduler getInstance()
          Get the singleton instance.
 void launch(Agent.Cfg cfg)
          Launches new agent.
 void quitAll()
          Quit all running agents.
 void restart(Scheduler.Cfg config)
          Quit all current agents, and start agents specified in given config object.
protected  void senseSelectAct()
           
 
Methods inherited from class sk.robotics.rlcs.agentspace.Agent
cleanup, exit, getConfig, getIdleTime, getWorkerThreadGroup, isAlive, kill, log, log, log, log, log, run, senseSelectAct, setLogLevel, setPeriodicTrigger, setPeriodicTrigger, sleep, start, startup, toString, trigger, trigger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

senseSelectAct

protected void senseSelectAct()
Overrides:
senseSelectAct in class Agent

getInstance

public static Scheduler getInstance()
Get the singleton instance.


quitAll

public void quitAll()
Quit all running agents. Set of exceptions (agents not to quit) can be passed.


restart

public void restart(Scheduler.Cfg config)
Quit all current agents, and start agents specified in given config object. This method may only be called from the main thread.


launch

public void launch(Agent.Cfg cfg)
Launches new agent. The new agent won't get added into the current config object, but only into the list of running agents. This means that this agent won't be visible from outside (through getCurrentConfig).


getCurrentConfig

public Scheduler.Cfg getCurrentConfig()
Returns:
Current configuration object