private byte[] createPacket(GridClientMessage msg) throws IOException {
  msg.clientId(id);
  ByteBuffer res=marsh.marshal(msg,45);
  ByteBuffer slice=res.slice();
  slice.put((byte)0x90);
  slice.putInt(res.remaining() - 5);
  slice.putLong(msg.requestId());
  slice.put(U.uuidToBytes(msg.clientId()));
  slice.put(U.uuidToBytes(msg.destinationId()));
  byte[] arr=new byte[res.remaining()];
  res.get(arr);
  return arr;
}

private byte [ ] createPacket ( GridClientMessage msg ) throws IOException { msg . clientId ( id ) ; ByteBuffer res = marsh . marshal ( msg , 45 ) ; ByteBuffer slice = res . slice ( ) ; slice . put ( ( byte ) 0x90 ) ; slice . putInt ( res . remaining ( ) - 5 ) ; slice . putLong ( msg . requestId ( ) ) ; slice . put ( U . uuidToBytes ( msg . clientId ( ) ) ) ; slice . put ( U . uuidToBytes ( msg . destinationId ( ) ) ) ; byte [ ] arr = new byte [ res . remaining ( ) ] ; res . get ( arr ) ; return arr ; }
creates hessian packet from client message .
