ibspan.tss.agents
Class SystemAgent

java.lang.Object
  extended by jade.core.Agent
      extended by ibspan.tss.agents.SystemAgent
All Implemented Interfaces:
TimerListener, Serializable, Runnable
Direct Known Subclasses:
PersonalAgent, ProfileManagingAgent, ProxyAgent, RestaurantServiceAgent, SessionHandlingAgent, ViewTransformingAgent

public abstract class SystemAgent
extends Agent

This is generic abstract class for all agents playining in the system. It provides functionality of configurating an agent from properties file.

Author:
Maciej Gawinecki
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class jade.core.Agent
Agent.Interrupted
 
Field Summary
 
Fields inherited from class jade.core.Agent
AP_ACTIVE, AP_DELETED, AP_IDLE, AP_INITIATED, AP_MAX, AP_MIN, AP_SUSPENDED, AP_WAITING, D_ACTIVE, D_MAX, D_MIN, D_RETIRED, D_SUSPENDED, D_UNKNOWN
 
Constructor Summary
SystemAgent()
          Constructs SystemAgent.
 
Method Summary
protected abstract  void activateProperties(Properties conf)
          Activates configuration by processing given properties.
protected  void setup()
          Loads configuration from properties file for this agent and passes it to activateProperties(Properties).
 
Methods inherited from class jade.core.Agent
addBehaviour, afterClone, afterMove, beforeClone, beforeMove, blockingReceive, blockingReceive, blockingReceive, blockingReceive, changeStateTo, clean, doActivate, doClone, doDelete, doMove, doSuspend, doTimeOut, doWait, doWait, doWake, getAgentState, getAID, getAMS, getArguments, getContainerController, getContentManager, getCurQueueSize, getDefaultDF, getHap, getHelper, getLocalName, getName, getO2AObject, getProperty, getQueueSize, getState, here, notifyChangeBehaviourState, notifyRestarted, postMessage, putBack, putO2AObject, receive, receive, removeBehaviour, restartLater, restore, restoreBufferedState, run, send, setArguments, setEnabledO2ACommunication, setGenerateBehaviourEvents, setQueueSize, takeDown, waitUntilStarted, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SystemAgent

public SystemAgent()
Constructs SystemAgent.

Method Detail

setup

protected void setup()
Loads configuration from properties file for this agent and passes it to activateProperties(Properties). Property file is given as the first argument for the launched agent. The programmer is encouraged to call this method in her agent's setup() method.

Overrides:
setup in class Agent

activateProperties

protected abstract void activateProperties(Properties conf)
                                    throws IncorrectPropertiesException
Activates configuration by processing given properties.

Parameters:
conf - are properties of the agent.
Throws:
IncorrectPropertiesException - if properties are syntactically or semantically invalid.