|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectes.upv.dsic.gti_ia.core.BaseAgent
es.upv.dsic.gti_ia.architecture.QueueAgent
public class QueueAgent
This class defines an new agents template, extending of BaseAgent. This type of agent's implements the protocols.
| Field Summary |
|---|
| Fields inherited from class es.upv.dsic.gti_ia.core.BaseAgent |
|---|
logger, session, traceSession |
| Constructor Summary | |
|---|---|
QueueAgent(AgentID aid)
Create a new QueueAgent. |
|
| Method Summary | |
|---|---|
void |
addTask(Object obj)
Adds a new task (FIPA protocol) to the agent,was creating a new thread |
protected void |
onMessage(ACLMessage msg)
Function that will be executed when the agent gets a message |
ACLMessage |
receiveACLMessage(MessageTemplate template)
Method to receives a magentix2 ACLMessage |
protected void |
terminate()
When agent state is terminated |
| Methods inherited from class es.upv.dsic.gti_ia.core.BaseAgent |
|---|
activateTraceService, changeIdentity, deactivateTraceService, execute, finalize, getAid, getName, init, onTraceEvent, run, send, sendTraceEvent, start |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public QueueAgent(AgentID aid)
throws Exception
aid - agent ID.
Exception - if agent id already exists on the platform| Method Detail |
|---|
protected void onMessage(ACLMessage msg)
onMessage in class BaseAgentmsg - ACLMessage
public ACLMessage receiveACLMessage(MessageTemplate template)
throws Exception
template - is a MessageTemplate, will serve as a filter for receiving the
right message
Exceptionprotected void terminate()
terminate in class BaseAgentpublic void addTask(Object obj)
obj - object of type FIPA protocol. ej: FIPARequestInitiator,
FIPARequestResponder, FIPAQueryResponder, FIPAQueryInitiator,
FIPAContractNetResponder, FIPAContractNetInitiator.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||