/** * Create a new message event. * @return The new message event. */ public IMessageEvent createMessageEvent(String type) { return getEventbase().createMessageEvent(type); }
/** * Send cfps to all receivers. * @param cfp The cfp. * @param convid The conversation id. * @param receivers The receivers. */ protected void sendCFP(Object cfp, String convid, List receivers) { // Send CFP. IMessageEvent cfpm = getEventbase().createMessageEvent("da_cfp"); cfpm.getParameterSet(SFipa.RECEIVERS).addValues(receivers.toArray()); cfpm.getParameter(SFipa.CONTENT).setValue(cfp); cfpm.getParameter(SFipa.CONVERSATION_ID).setValue(convid); getLogger().info(getComponentName() + ": cfp(" + cfp + ")"); sendMessage(cfpm); }
/** * Send cfps to all receivers. * @param cfp The cfp. * @param convid The conversation id. * @param receivers The receivers. */ protected void sendCFP(Object cfp, String convid, List receivers) { // Send CFP. IMessageEvent cfpm = getEventbase().createMessageEvent("ea_cfp"); cfpm.getParameterSet(SFipa.RECEIVERS).addValues(receivers.toArray()); cfpm.getParameter(SFipa.CONTENT).setValue(cfp); cfpm.getParameter(SFipa.CONVERSATION_ID).setValue(convid); getLogger().info(getComponentName() + ": cfp(" + cfp + ")"); sendMessage(cfpm); }
/** * Announce the planned auction. * @param auctiondesc the auction description. * @param receivers The receivers. * @param convid The conversation id. */ protected void announceAuction(Object auctiondesc, List receivers, String convid) { // Send the inform_start_auction-message to all receivers. start = getEventbase().createMessageEvent("da_inform_start_auction"); start.getParameterSet(SFipa.RECEIVERS).addValues(receivers.toArray()); start.getParameter(SFipa.CONTENT).setValue(auctiondesc); start.getParameter(SFipa.CONVERSATION_ID).setValue(convid); getLogger().info(getComponentName() + ": inform_start_auction"); getWaitqueue().addReply(start); sendMessage(start); }
/** * Announce the planned auction. * @param auctiondesc the auction description. * @param receivers The receivers. * @param convid The conversation id. */ protected void announceAuction(Object auctiondesc, List receivers, String convid) { // Send the inform_start_auction-message to all receivers. start = getEventbase().createMessageEvent("ea_inform_start_auction"); start.getParameterSet(SFipa.RECEIVERS).addValues(receivers.toArray()); start.getParameter(SFipa.CONTENT).setValue(auctiondesc); start.getParameter(SFipa.CONVERSATION_ID).setValue(convid); getLogger().info(getComponentName() + ":\tinform_start_auction"); getWaitqueue().addReply(start); sendMessage(start); }
IMessageEvent end = getEventbase().createMessageEvent("da_inform_end_auction"); end.getParameter(SFipa.CONTENT).setValue(new Object[]{Boolean.TRUE,winning_offer}); end.getParameterSet(SFipa.RECEIVERS).addValue(winner); IMessageEvent end = getEventbase().createMessageEvent("da_inform_end_auction"); end.getParameter(SFipa.CONTENT).setValue(new Object[]{Boolean.FALSE,winning_offer}); end.getParameterSet(SFipa.RECEIVERS).addValues(losers.toArray());
IMessageEvent end = getEventbase().createMessageEvent("ea_inform_end_auction"); end.getParameter(SFipa.CONTENT).setValue(new Object[]{Boolean.TRUE,winning_offer}); end.getParameterSet(SFipa.RECEIVERS).addValue(winner); IMessageEvent end = getEventbase().createMessageEvent("ea_inform_end_auction"); end.getParameter(SFipa.CONTENT).setValue(new Object[]{Boolean.FALSE,winning_offer}); end.getParameterSet(SFipa.RECEIVERS).addValues(losers.toArray());