@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()); }
public void write(ActiveMQBuffer buffer, final boolean flush, final boolean batched) { write(buffer, flush, batched, null); }
public void write(final ActiveMQBuffer buffer) { write(buffer, false, false); }