|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectes.upv.dsic.gti_ia.architecture.FIPARequestInitiator
public class FIPARequestInitiator
This class implements the FIPA-Request interaction protocol, Role Initiator
| Field Summary | |
|---|---|
QueueAgent |
myAgent
|
| Constructor Summary | |
|---|---|
FIPARequestInitiator(QueueAgent agent,
ACLMessage msg)
Creates a new FIPA-Request interaction protocol, Role initiator. |
|
| Method Summary | |
|---|---|
void |
action()
Runs the state machine with the communication protocol |
void |
finish()
Sends a CANCEL Message for active conversation and and terminates the protocol |
boolean |
finished()
This method reports if the protocol has been finished |
String |
getIdConversation()
Returns the id of the message used in communication protocol |
QueueAgent |
getQueueAgent()
Returns the agent. |
protected void |
handleAgree(ACLMessage msg)
This method is called when a agree message is received. |
protected void |
handleFailure(ACLMessage msg)
This method is called when a Failure message is received. |
protected void |
handleInform(ACLMessage msg)
This method is called when a Inform message is received. |
protected void |
handleNotUnderstood(ACLMessage msg)
This method is called when a NotUnderstood message is received. |
protected void |
handleOutOfSequence(ACLMessage msg)
This method is called when a unexpected message is received. |
protected void |
handleRefuse(ACLMessage msg)
This method is called when a refuse message is received. |
protected ACLMessage |
prepareRequest(ACLMessage msg)
This method must return the ACLMessage to be sent. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public QueueAgent myAgent
| Constructor Detail |
|---|
public FIPARequestInitiator(QueueAgent agent,
ACLMessage msg)
agent - agent is the reference to the Agent Objectmsg - initial message| Method Detail |
|---|
public QueueAgent getQueueAgent()
public boolean finished()
public String getIdConversation()
public void finish()
public void action()
protected ACLMessage prepareRequest(ACLMessage msg)
msg - the ACLMessage object passed in the constructor.
protected void handleAgree(ACLMessage msg)
msg - the received agree message.protected void handleRefuse(ACLMessage msg)
msg - the received refuse message.protected void handleNotUnderstood(ACLMessage msg)
msg - the received NotUnderstood message.protected void handleInform(ACLMessage msg)
msg - the received Inform message.protected void handleFailure(ACLMessage msg)
msg - the received Failure message.protected void handleOutOfSequence(ACLMessage msg)
msg - the received message
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||