content = "Sorry word is not in database: "+eword; IMessageEvent re = getEventbase().createReply(me, reply); re.getParameter(SFipa.CONTENT).setValue(content); sendMessage(re);
if(proposal!=null) IMessageEvent reject = getEventbase().createReply(proposal, getShortProtocolName()+"_reject"); reject.getParameter(SFipa.CONTENT).setValue(reject_proposals[i].getProposal()); sendMessage(reject);
reply = "failure"; IMessageEvent replymsg = getEventbase().createReply((IMessageEvent)getReason(), reply); replymsg.getParameter(SFipa.CONTENT).setValue(cont); sendMessage(replymsg);
/** * Execute a plan. */ public void body() { IMessageEvent querybet = (IMessageEvent)getReason(); // Reply to dealer. IMessageEvent msg = getEventbase().createReply(querybet, "refuse_bet"); msg.getParameter(SFipa.CONTENT).setValue(querybet.getParameter(SFipa.CONTENT).getValue()); getLogger().info("sending decline to the dealer..."); sendMessage(msg); } }
cont = "Request format not correct."; IMessageEvent re = getEventbase().createReply(me, reply); re.getParameter(SFipa.CONTENT).setValue(cont); sendMessage(re);
reply = "failure"; IMessageEvent replymsg = getEventbase().createReply((IMessageEvent)getReason(), reply); replymsg.getParameter(SFipa.CONTENT).setValue(cont); sendMessage(replymsg);
reply = "failure"; IMessageEvent replymsg = getEventbase().createReply((IMessageEvent)getReason(), reply); replymsg.getParameter(SFipa.CONTENT).setValue(cont); sendMessage(replymsg);
reply = "failure"; IMessageEvent re = getEventbase().createReply((IMessageEvent)getReason(), reply); re.getParameter(SFipa.CONTENT).setValue(cont); sendMessage(re);
/** * */ public void body() { IMessageEvent msg = (IMessageEvent) getParameter("message").getValue(); IMessageEvent update = getEventbase().createReply(msg, "sp_inform"); update.getParameter(SFipa.CONTENT).setValue(getParameter("update").getValue()); sendMessage(update); } }
/** * Execute the plan. */ public void body() { IMessageEvent rep = getEventbase().createReply((IMessageEvent)getReason(), "not_understood"); rep.getParameter(SFipa.CONTENT).setValue(((IParameterElement)getReason()).getParameter(SFipa.CONTENT).getValue()); sendMessage(rep); // sendMessage(((IMessageEvent)getReason()).createReply( // "not_understood", getReason().getParameter(SFipa.CONTENT).getValue())); } }
if(failure_reason==null) reply = getEventbase().createReply(cancel_msg, "cm_inform"); reply = getEventbase().createReply(cancel_msg, "cm_failure"); IMessageEvent reply = getEventbase().createReply(inimsg, "cm_not_understood"); sendMessage(reply).get(); getLogger().info("Receiver cancelled: "+getComponentName());
for(int i=1; i<=num; i++) IMessageEvent answer = getEventbase().createReply(event, "inform"); answer.getParameter(SFipa.CONTENT).setValue(""+i);
sendMessage(getEventbase().createReply(tmp, "da_accept_proposal")); getLogger().info(getComponentName() + " found winner: "+tmp.getParameter(SFipa.SENDER).getValue()); sendMessage(getEventbase().createReply(tmp, "da_reject_proposal")); getLogger().info(getComponentName() + ": rejected proposal");
reply = getEventbase().createReply(me, getShortProtocolName()+"_agree"); sendMessage(reply); reply = getEventbase().createReply(me, getShortProtocolName()+"_refuse"); sendMessage(reply); return; reply = getEventbase().createReply(me, getShortProtocolName()+"_inform"); reply.getParameter(SFipa.CONTENT).setValue(res); getLogger().info("Receiver sent inform."); reply = getEventbase().createReply(me, getShortProtocolName()+"_failure"); sendMessage(reply);
+auctiondesc.getTopic()+" that it doesn't want to participate."); sendMessage(getEventbase().createReply(cfp, "da_not_understood")); sendMessage(getEventbase().createReply(cfp, "da_propose")); getLogger().info(getComponentName()+" accepted proposal: "+cfp.getParameter(SFipa.CONTENT).getValue());
+auctiondesc.getTopic()+" that it doesn't want to participate."); sendMessage(getEventbase().createReply(cfp, "ea_not_understood")); sendMessage(getEventbase().createReply(cfp, "ea_propose"));
/** * Handle the ping request. */ public void body() { // Get the initial event. IMessageEvent me = (IMessageEvent)getReason(); // System.out.println("Echo plan invoked: "+me.getParameter(SFipa.CONTENT).getValue()); // Create the reply. IMessageEvent re = getEventbase().createReply(me, "any_message"); re.getParameter(SFipa.PERFORMATIVE).setValue(me.getParameter( SFipa.PERFORMATIVE).getValue()); re.getParameter(SFipa.CONTENT).setValue(me.getParameter( SFipa.CONTENT).getValue()); // Send back the reply and terminate. sendMessage(re); } }
public void body() { IMessageEvent msg = (IMessageEvent) getReason(); IMessageEvent reply = getEventbase().createReply(msg, "sp_agree"); sendMessage(reply); IGoal startSub = createGoal("sp_start_subscription"); startSub.getParameter("initiator").setValue(msg.getParameter(SFipa.SENDER).getValue()); startSub.getParameter("subscription_id").setValue(msg); startSub.getParameter("subscription").setValue(msg.getParameter(SFipa.CONTENT).getValue()); dispatchSubgoalAndWait(startSub); } }
failure_reason = failure_reason!=null ? failure_reason : e.toString(); IMessageEvent reply = getEventbase().createReply(cancel_msg, "cm_failure");
Done done = new Done(rj); IMessageEvent ans = getEventbase().createReply(request, "inform_action_done"); ans.getParameter(SFipa.CONTENT).setValue(done); sendMessage(ans);