Example #1
0
 protected PingData readPingData(byte[] buffer, int offset, int length) {
   try {
     return buffer != null
         ? Util.streamableFromBuffer(PingData.class, buffer, offset, length)
         : null;
   } catch (Exception ex) {
     log.error("%s: failed reading PingData from message: %s", local_addr, ex);
     return null;
   }
 }
Example #2
0
 /**
  * Unmarshal the original message (in the payload) and then pass it up (unless already delivered)
  *
  * @param msg
  */
 protected void unwrapAndDeliver(final Message msg, boolean flush_ack) {
   try {
     Message msg_to_deliver =
         Util.streamableFromBuffer(
             Message.class, msg.getRawBuffer(), msg.getOffset(), msg.getLength());
     SequencerHeader hdr = (SequencerHeader) msg_to_deliver.getHeader(this.id);
     if (flush_ack) hdr.flush_ack = true;
     deliver(msg_to_deliver, new Event(Event.MSG, msg_to_deliver), hdr);
   } catch (Exception ex) {
     log.error(Util.getMessage("FailureUnmarshallingBuffer"), ex);
   }
 }