it.unimo.dbgroup.momis.agent
Class BasicGui

java.lang.Object
  extended byjade.core.Agent
      extended byjade.gui.GuiAgent
          extended byit.unimo.dbgroup.momis.agent.BasicGui
All Implemented Interfaces:
java.lang.Runnable, java.io.Serializable, jade.util.leap.Serializable, jade.core.TimerListener
Direct Known Subclasses:
BuyerAgent, QueryAgent, SellerAgent, ServiceAgent

public class BasicGui
extends jade.gui.GuiAgent

BasicGUI class: this class defines the basic fields and methods every agent with a GUI posseses

Version:
1.0 $Date: 20/03/2002
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class jade.gui.GuiAgent
 
Nested classes inherited from class jade.core.Agent
 
Field Summary
private  jade.domain.FIPAAgentManagement.DFAgentDescription _dfd
           
private  jade.core.ContainerID bornIn
          variable to store the Container where the agent was born
 
Fields inherited from class jade.gui.GuiAgent
 
Fields inherited from class jade.core.Agent
AP_ACTIVE, AP_DELETED, AP_IDLE, AP_INITIATED, AP_MAX, AP_MIN, AP_SUSPENDED, AP_TRANSIT, AP_WAITING, currentBehaviour, currentMessage, D_ACTIVE, D_MAX, D_MIN, D_RETIRED, D_SUSPENDED, D_UNKNOWN
 
Constructor Summary
BasicGui()
           
 
Method Summary
protected  void addServices(jade.domain.FIPAAgentManagement.ServiceDescription sd)
          builds the description of the service provided by this agent.
protected  void afterMove()
          standard action after moving.
protected  void back()
          move the agent back home to the container it was born in
protected  void beforeMove()
          standard action before moving.
 java.lang.String bornContainerID()
          returns the ID of the container the agent was born in
protected  void extendedSetup()
          allows further agent's intialisation (to be overriden)
protected  void onGuiEvent(jade.gui.GuiEvent ev)
          overrides the coresponding methods of jade.gui.GuiAgent
protected  void registration()
          registers with the DF.
protected  boolean removeServices(jade.domain.FIPAAgentManagement.ServiceDescription sd)
           
protected  void setup()
          sets up the basic configuration for each agent, overriding the corresponding method defined in jade.core.Agent
protected  java.lang.String thisContainerID()
          returns the ID of the current container the agent is placed in
protected  java.lang.String thisPlatformID()
          returns the ID of the current platform the agent executes in
 
Methods inherited from class jade.gui.GuiAgent
postGuiEvent
 
Methods inherited from class jade.core.Agent
addBehaviour, afterClone, beforeClone, blockingReceive, blockingReceive, blockingReceive, blockingReceive, doActivate, doClone, doDelete, doMove, doStart, doSuspend, doTimeOut, doWait, doWait, doWake, extractPassword, extractUsername, getAID, getAMS, getArguments, getAuthority, getCertificateFolder, getContainerController, getContentManager, getCurQueueSize, getDefaultDF, getHap, getLocalName, getName, getO2AObject, getPrincipal, getProperty, getQueueSize, getState, here, notifyChangeBehaviourState, notifyRestarted, postMessage, putBack, putO2AObject, read, read, receive, receive, removeBehaviour, restartLater, restore, run, send, setArguments, setEnabledO2ACommunication, setOwnership, setPrincipal, setQueueSize, takeDown, waitUntilStarted, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bornIn

private jade.core.ContainerID bornIn
variable to store the Container where the agent was born


_dfd

private jade.domain.FIPAAgentManagement.DFAgentDescription _dfd
Constructor Detail

BasicGui

public BasicGui()
Method Detail

registration

protected void registration()
registers with the DF. NOTE!! This is done in a blocking way so as to be sure that the agent starts executing its behaviours only if the operation was succesfull


addServices

protected void addServices(jade.domain.FIPAAgentManagement.ServiceDescription sd)
builds the description of the service provided by this agent. The description is included in the AgentDescritpion for registering with the DF. The method of the Basic or BasicGui classes provides a standard description. it is strongly suggested to override this method in order to set the right information about the agent's service.


removeServices

protected boolean removeServices(jade.domain.FIPAAgentManagement.ServiceDescription sd)

extendedSetup

protected void extendedSetup()
allows further agent's intialisation (to be overriden)


beforeMove

protected void beforeMove()
standard action before moving. Each agent can define its own behaviour before moving by simply overriding this method


afterMove

protected void afterMove()
standard action after moving. Each agent can define its own behaviour after moving by simply overriding this method


thisPlatformID

protected java.lang.String thisPlatformID()
returns the ID of the current platform the agent executes in


thisContainerID

protected java.lang.String thisContainerID()
returns the ID of the current container the agent is placed in


bornContainerID

public java.lang.String bornContainerID()
returns the ID of the container the agent was born in


back

protected void back()
move the agent back home to the container it was born in


setup

protected void setup()
sets up the basic configuration for each agent, overriding the corresponding method defined in jade.core.Agent


onGuiEvent

protected void onGuiEvent(jade.gui.GuiEvent ev)
overrides the coresponding methods of jade.gui.GuiAgent



Universita' di Modena e Reggio Emilia