コード例 #1
0
  @Test
  public void testWrite() throws Exception {
    ActiveMQBuffer buff = ActiveMQBuffers.wrappedBuffer(ByteBuffer.allocate(128));
    EmbeddedChannel channel = createChannel();

    Assert.assertEquals(0, channel.outboundMessages().size());

    NettyConnection conn = new NettyConnection(emptyMap, channel, new MyListener(), false, false);
    conn.write(buff);
    channel.runPendingTasks();
    Assert.assertEquals(1, channel.outboundMessages().size());
  }
コード例 #2
0
 public void write(ActiveMQBuffer buffer, final boolean flush, final boolean batched) {
   write(buffer, flush, batched, null);
 }
コード例 #3
0
 public void write(final ActiveMQBuffer buffer) {
   write(buffer, false, false);
 }