es.upv.dsic.gti_ia.jason
Class JasonAgent

java.lang.Object
  extended by es.upv.dsic.gti_ia.core.BaseAgent
      extended by es.upv.dsic.gti_ia.cAgents.CAgent
          extended by es.upv.dsic.gti_ia.jason.JasonAgent
All Implemented Interfaces:
Runnable

public class JasonAgent
extends CAgent

Author:
Ricard Lopez Fogues

Field Summary
 
Fields inherited from class es.upv.dsic.gti_ia.cAgents.CAgent
defaultFactory, exec, welcomeProcessor
 
Fields inherited from class es.upv.dsic.gti_ia.core.BaseAgent
logger, session, traceSession
 
Constructor Summary
JasonAgent(AgentID aid, String filename, MagentixAgArch arch)
          Creates a new Jason Agent
 
Method Summary
protected  void createDefaultFactory(CAgent me)
          Creates a different default factory adapted to the Jason's reasoning cycle
protected  void execution(CProcessor firstProcessor, ACLMessage welcomeMessage)
          This is the main method of the agent
protected  void finalize(CProcessor firstProcessor, ACLMessage finalizeMessage)
          This method is executed just before the agent ends its execution
 MagentixAgArch getAgArch()
          returns the architecture
 
Methods inherited from class es.upv.dsic.gti_ia.cAgents.CAgent
addFactoryAsInitiator, addFactoryAsParticipant, addProcessor, addTimer, endConversation, execute, getMutexHoldCount, lock, newConversationID, notifyAgentEnd, onMessage, removeFactory, removeProcessor, send, Shutdown, startConversation, startSyncConversation, unlock
 
Methods inherited from class es.upv.dsic.gti_ia.core.BaseAgent
activateTraceService, changeIdentity, deactivateTraceService, finalize, getAid, getName, init, onTraceEvent, run, sendTraceEvent, start, terminate
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JasonAgent

public JasonAgent(AgentID aid,
                  String filename,
                  MagentixAgArch arch)
           throws Exception
Creates a new Jason Agent

Parameters:
aid - Agent identifier
filename - File with the AgentSepak code
arch - Agent architecture
Throws:
Exception
Method Detail

finalize

protected void finalize(CProcessor firstProcessor,
                        ACLMessage finalizeMessage)
Description copied from class: CAgent
This method is executed just before the agent ends its execution

Specified by:
finalize in class CAgent
Parameters:
firstProcessor - The CProcessor managing the welcome conversation
finalizeMessage - The final message produced by this conversation

execution

protected void execution(CProcessor firstProcessor,
                         ACLMessage welcomeMessage)
Description copied from class: CAgent
This is the main method of the agent

Specified by:
execution in class CAgent
Parameters:
firstProcessor - The CProcessor managing the welcome conversation
welcomeMessage - The message sent by the platform to the agent

getAgArch

public MagentixAgArch getAgArch()
returns the architecture

Returns:

createDefaultFactory

protected final void createDefaultFactory(CAgent me)
Creates a different default factory adapted to the Jason's reasoning cycle

Overrides:
createDefaultFactory in class CAgent
Parameters:
me - The agent owner of this factory


Copyright © 2012 GTI-IA. All Rights Reserved.