springs.context.threads
Class AgentExecutor

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--springs.context.threads.AgentExecutor
All Implemented Interfaces:
java.lang.Runnable

public class AgentExecutor
extends java.lang.Thread

A Springs agent executor.

Author:
Sergio Ilarri Artigas

Field Summary
private  springs.agent.SpringsAgent _agent
           
private  boolean _isMoving
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
AgentExecutor(springs.agent.SpringsAgent agent, boolean isMoving)
          Constructor.
 
Method Summary
private  void executeSchedule()
          Executes the tasks registered in the agent's schedule.
 void run()
          Main method, corresponding to the thread assigned to the agent.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_agent

private springs.agent.SpringsAgent _agent

_isMoving

private boolean _isMoving
Constructor Detail

AgentExecutor

public AgentExecutor(springs.agent.SpringsAgent agent,
                     boolean isMoving)
Constructor.

Parameters:
agent - the agent to execute.
isMoving - a boolean indicating whether the agent is moving or not.
See Also:
SpringsAgent
Method Detail

run

public void run()
Main method, corresponding to the thread assigned to the agent.

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

executeSchedule

private void executeSchedule()
                      throws java.lang.Exception
Executes the tasks registered in the agent's schedule.

Throws:
java.lang.Exception - if there is some problem executing the schedule.
See Also:
Exception