private void handleSendEvent(SendEvent conf) { Message message = conf.getMessage(); int id = message.popInt(); System.out.println("[Message received: " + message.peekString() + "]"); message.pushInt(id); DeliverEvent event = new DeliverEvent(); event.setMessage(message); event.setDestProcess(processes.getOther()); event.setSourceProcess(processes.getSelf()); event.setChannel(conf.getChannel()); event.setDir(Direction.DOWN); event.setSourceSession(this); try { event.init(); event.go(); } catch (AppiaEventException ex) { ex.printStackTrace(); } }
public void pushMySelf(Message m) { m.pushObject(message); m.pushInt(number); }
/** * Push all parameters of a Header into a Appia Message. * * @param header header to push into the message * @param message message to put the header */ public static void push(SEQHeader header, Message message) { message.pushInt(header.id); message.pushLong(header.sn); message.pushLong(header.order); }
/** * Push all parameters of a Header into a Appia Message. * * @param header header to push into the message * @param message message to put the header */ public static void push(DATAHeader header, Message message) { message.pushInt(header.id); message.pushLong(header.sn); message.pushLong(header.delay); }