コード例 #1
0
  /** Constructor for when receiving a message from the server */
  public JBossMessage(final ClientMessage message, ClientSession session) {
    this.message = message;

    this.readOnly = true;

    this.session = session;

    this.body = message.getBody();
  }
コード例 #2
0
  public JBossMessage(byte type) {
    message =
        new ClientMessageImpl(
            type,
            true,
            0,
            System.currentTimeMillis(),
            (byte) 4,
            new ByteBufferWrapper(ByteBuffer.allocate(1024)));

    // TODO - can we lazily create this?
    body = message.getBody();
  }
コード例 #3
0
 public void doBeforeReceive() throws Exception {
   body = message.getBody();
 }
コード例 #4
0
  /*
   * Create a new message prior to sending
   */
  protected JBossMessage(final byte type, final ClientSession session) {
    message = session.createClientMessage(type, true, 0, System.currentTimeMillis(), (byte) 4);

    // TODO - can we lazily create this?
    body = message.getBody();
  }