|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jade.core.behaviours.Behaviour | +--jade.core.behaviours.SimpleBehaviour | +--jade.proto.SimpleAchieveREInitiator | +--jade.domain.RequestFIPAServiceBehaviour
This class extends the FipaRequestIntiatorBehaviour
in order to request an agent, e.g. DF or AMS
to perform a specific action.
This class implements all the abstract method of the super classes, therefore the behaviour can be immediately added to an agent.
In some cases, it might be usefull to extend this class to override
some of its methods and
react to the received messages in an application-specific manner.
The class has two constructor. The first generic constructor can be used for all the action an agent can perform. In the case of a
a search action the default search constraints are used.
The second constructor is specific for a search action and it allows
to specify additional search constraints.
DFService
,
AMSService
, Serialized FormInner Class Summary | |
static interface |
RequestFIPAServiceBehaviour.NotYetReady
Exception class for timeouts. |
Inner classes inherited from class jade.core.behaviours.Behaviour |
Behaviour.RunnableChangedEvent |
Fields inherited from class jade.proto.SimpleAchieveREInitiator |
ALL_RESPONSES_KEY,
ALL_RESULT_NOTIFICATIONS_KEY,
REQUEST_KEY,
REQUEST_SENT_KEY,
SECOND_REPLY_KEY |
Fields inherited from class jade.core.behaviours.Behaviour |
myAgent,
myEvent,
NOTIFY_DOWN,
NOTIFY_UP,
parent,
STATE_BLOCKED,
STATE_READY,
STATE_RUNNING |
Constructor Summary | |
RequestFIPAServiceBehaviour(Agent a,
AID receiver,
java.lang.String actionName,
java.lang.Object agentDescription)
Create a behaviour to request an agent to perform a specific action. |
|
RequestFIPAServiceBehaviour(Agent a,
AID receiver,
java.lang.String actionName,
java.lang.Object agentDescription,
SearchConstraints constraints)
Create a behaviour to request an agent to perform a specific action. |
Method Summary | |
ACLMessage |
getLastMsg()
This public method allows to get the INFORM message received in the final state of this FIPA-Request protocol. |
java.util.List |
getSearchResult()
Deprecated. Use getSearchResults() instead. |
java.lang.Object[] |
getSearchResults()
This public method allows to get the results of a search operation. |
protected void |
handleAgree(ACLMessage reply)
Method to handle agree replies. |
protected void |
handleAllResponses(java.util.Vector reply)
This method handle is called after receiving all the responses and when the timeout is expired( in this case no reply has been received. |
protected void |
handleFailure(ACLMessage reply)
Method to handle failure replies. |
protected void |
handleInform(ACLMessage reply)
Method to handle inform replies. |
protected void |
handleNotUnderstood(ACLMessage reply)
Method to handle not-understood replies. |
protected void |
handleOutOfSequence(ACLMessage reply)
Method to handle out of sequence replies. |
protected void |
handleRefuse(ACLMessage reply)
Method to handle refuse replies. |
Methods inherited from class jade.proto.SimpleAchieveREInitiator |
action,
done,
handleAllResultNotifications,
onStart,
prepareRequest,
reset,
reset |
Methods inherited from class jade.core.behaviours.Behaviour |
actionWrapper,
block,
block,
getBehaviourName,
getDataStore,
handle,
isRunnable,
onEnd,
restart,
root,
setAgent,
setBehaviourName,
setDataStore |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public RequestFIPAServiceBehaviour(Agent a, AID receiver, java.lang.String actionName, java.lang.Object agentDescription, SearchConstraints constraints) throws FIPAException
a
- The agent this behaviour belongs to, i.e. the agent who is
interested in the search result.receiver
- The agent who will be requested to perform the action.agentDescription
- An agent descriptor used according to the action required.constraints
- The search contraints for the search action.SearchConstraints
public RequestFIPAServiceBehaviour(Agent a, AID receiver, java.lang.String actionName, java.lang.Object agentDescription) throws FIPAException
a
- The agent this behaviour belongs to, i.e the agent who is interested in the action.dfName
- The DF who will perform the action.dfAction
- The action requested to the DF.dfd
- An agent descriptor that will be use according to the action required to the DF.RequestFIPAServiceBehaviour(Agent a, AID receiver, String actionName, Object agentDescription, SearchConstraints constraints)
Method Detail |
protected void handleNotUnderstood(ACLMessage reply)
not-understood
replies.reply
- The actual ACL message received. It is of
not-understood
type and matches the conversation
template.protected void handleRefuse(ACLMessage reply)
refuse
replies.reply
- The actual ACL message received. It is of
refuse
type and matches the conversation
template.protected void handleAgree(ACLMessage reply)
agree
replies.reply
- The actual ACL message received. It is of
agree
type and matches the conversation
template.protected void handleFailure(ACLMessage reply)
failure
replies.reply
- The actual ACL message received. It is of
failure
type and matches the conversation
template.protected void handleInform(ACLMessage reply)
inform
replies.reply
- The actual ACL message received. It is of
inform
type and matches the conversation
template.protected void handleOutOfSequence(ACLMessage reply)
reply
- The actual ACL message received.protected void handleAllResponses(java.util.Vector reply)
responses
- the Vector of ACLMessage objects that have been receivedpublic ACLMessage getLastMsg() throws FIPAException, RequestFIPAServiceBehaviour.NotYetReady
public java.util.List getSearchResult() throws FIPAException, RequestFIPAServiceBehaviour.NotYetReady
public java.lang.Object[] getSearchResults() throws FIPAException, RequestFIPAServiceBehaviour.NotYetReady
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |