this.reqMsg = (ACLMessage)request.clone();
this.action = actionName;
this.receiver = receiver;
this.parent = (AID)parentDF;
Action act = new Action();
act.setActor(receiver);
if(actionName.equalsIgnoreCase(DFAppletVocabulary.FEDERATE))
{
Federate action = new Federate();
action.setDf((AID) parentDF);
action.setDescription((DFAgentDescription) description);
act.setAction(action);
}
else
if(actionName.equalsIgnoreCase(DFAppletVocabulary.GETDESCRIPTION))
act.setAction(new GetDescription());
else
if(actionName.equalsIgnoreCase(DFAppletVocabulary.GETPARENTS))
act.setAction(new GetParents());
else
if(actionName.equalsIgnoreCase(DFAppletVocabulary.GETDESCRIPTIONUSED))
{
GetDescriptionUsed action = new GetDescriptionUsed();
action.setParentDF((AID) parentDF);
act.setAction(action);
}
else
if(actionName.equalsIgnoreCase(DFAppletVocabulary.DEREGISTERFROM))
{
DeregisterFrom action = new DeregisterFrom();
action.setDf((AID) parentDF);
action.setDescription((DFAgentDescription) description);
act.setAction(action);
}
else
if(actionName.equalsIgnoreCase(DFAppletVocabulary.REGISTERWITH))
{
RegisterWith action = new RegisterWith();
action.setDf((AID)parentDF);
action.setDescription((DFAgentDescription)description);
act.setAction(action);
}
else
if(actionName.equalsIgnoreCase(DFAppletVocabulary.SEARCHON))
{
SearchOn action = new SearchOn();
action.setDf((AID)parentDF);
action.setDescription((DFAgentDescription)description);
action.setConstraints(constraints);
act.setAction(action);
}
else
if(actionName.equalsIgnoreCase(DFAppletVocabulary.MODIFYON))
{
ModifyOn action = new ModifyOn();
action.setDf((AID)parentDF);
action.setDescription((DFAgentDescription)description);
act.setAction(action);
}
else
throw new UnsupportedFunction();