com.agentfactory.cldc.scheduler
Class AgentRunnable

java.lang.Object
  extended by com.agentfactory.cldc.scheduler.AgentRunnable
All Implemented Interfaces:
java.lang.Runnable
Direct Known Subclasses:
BasicRunnable, MIDletRunnable

public abstract class AgentRunnable
extends java.lang.Object
implements java.lang.Runnable

This is an abstract that is used to control the process of executing an agent in the scheduler. In MIDP, the MIDletRunnable will be used for debugging purposes, but in environments where there is no interface BasicRunnablewill be used or some other extentions of AgentRunnable that the application developer has written.

Author:
Conor Muldoon

Constructor Summary
AgentRunnable(Agent agt)
          Constructs an instance of AgentRunnable.
 
Method Summary
 void addFOSBelief(FOS fos)
          Adds a belief to the agent.
abstract  void display()
          Displays the mental state of the agent.
abstract  void start()
          Starts the agent.
abstract  void stop()
          Stops the agent.
 void writeToStream(java.io.DataOutputStream output)
          Writes the state of the agent to a data output stream.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.lang.Runnable
run
 

Constructor Detail

AgentRunnable

public AgentRunnable(Agent agt)
Constructs an instance of AgentRunnable.

Parameters:
agt - the agent that the runnable class controls.
Method Detail

addFOSBelief

public void addFOSBelief(FOS fos)
Adds a belief to the agent.

Parameters:
fos - the belief to be added.

start

public abstract void start()
Starts the agent.


display

public abstract void display()
Displays the mental state of the agent.


stop

public abstract void stop()
Stops the agent.


writeToStream

public void writeToStream(java.io.DataOutputStream output)
                   throws java.io.IOException
Writes the state of the agent to a data output stream.

Parameters:
output - the stream that the state is to be written to.
Throws:
java.io.IOException - if there is an I/O error.