|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectes.upv.dsic.gti_ia.architecture.FIPARequestResponder
public class FIPARequestResponder
This class implements the FIPA-Request interaction protocol, Role Responder.
| Field Summary | |
|---|---|
QueueAgent |
myAgent
|
| Constructor Summary | |
|---|---|
FIPARequestResponder(QueueAgent _agent,
MessageTemplate _template)
Creates a new FIPA-Request interaction protocol, Role responder. |
|
| Method Summary | |
|---|---|
void |
action()
Runs the state machine with the communication protocol |
void |
finish()
Sends a CANCEL Message for active conversation and terminates the protocol |
QueueAgent |
getQueueAgent()
Returns the agent. |
protected ACLMessage |
prepareResponse(ACLMessage request)
This method is called when the initiator's message is received that matches the message template passed in the constructor. |
protected ACLMessage |
prepareResultNotification(ACLMessage request,
ACLMessage responder)
This method is called after the response has been sent and only when one of the following two cases arise: the response was an agree message OR no response message was 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 FIPARequestResponder(QueueAgent _agent,
MessageTemplate _template)
agent - agent is the reference to the Agent Object.template - is a MessageTemplate, will serve as a filter for receiving the
right message| Method Detail |
|---|
public QueueAgent getQueueAgent()
public void finish()
public void action()
protected ACLMessage prepareResponse(ACLMessage request)
throws NotUnderstoodException,
RefuseException
request - initial message
NotUnderstoodException
RefuseException
protected ACLMessage prepareResultNotification(ACLMessage request,
ACLMessage responder)
throws FailureException
request - ACLMessageresponder - ACLMessage
FailureException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||