the method locally discovers that the passed parameters are not valid.
* @see jade.domain.FIPAAgentManagement.SearchConstraints
*/
public RequestFIPAServiceBehaviour(Agent a, AID receiver, String actionName, Object agentDescription, SearchConstraints constraints) throws FIPAException {
//super(a, new ACLMessage(ACLMessage.REQUEST), mt);
super(a,new ACLMessage(ACLMessage.REQUEST));
ACLMessage msg = FIPAService.createRequestMessage(a,receiver);
Action act = new Action();
act.setActor(receiver);
if (actionName.equalsIgnoreCase(FIPAManagementVocabulary.REGISTER)) {
Register action = new Register();
action.setDescription(agentDescription);
act.setAction(action);
}
else if (actionName.equalsIgnoreCase(FIPAManagementVocabulary.DEREGISTER)) {
Deregister action = new Deregister();
action.setDescription(agentDescription);
act.setAction(action);
}
else if (actionName.equalsIgnoreCase(FIPAManagementVocabulary.MODIFY)) {
Modify action = new Modify();
action.setDescription(agentDescription);
act.setAction(action);
}
else if (actionName.equalsIgnoreCase(FIPAManagementVocabulary.SEARCH)) {
Search action = new Search();
action.setDescription(agentDescription);
action.setConstraints(constraints);
act.setAction(action);
// set a timeout for the recursive search.
msg.setReplyByDate(new Date(System.currentTimeMillis()+ timeout));
}
else
throw new UnsupportedFunction();
// initialize SL0 Codec and FIPAManagementVocabulary