Example usage for io.netty.channel FixedRecvByteBufAllocator newHandle

List of usage examples for io.netty.channel FixedRecvByteBufAllocator newHandle

Introduction

In this page you can find the example usage for io.netty.channel FixedRecvByteBufAllocator newHandle.

Prototype

@SuppressWarnings("deprecation")
    @Override
    public Handle newHandle() 

Source Link

Usage

From source file:org.graylog2.inputs.transports.UdpTransportTest.java

License:Open Source License

@Test
public void receiveBufferSizePredictorIsUsingDefaultSize() {
    FixedRecvByteBufAllocator recvByteBufAllocator = (FixedRecvByteBufAllocator) udpTransport
            .getBootstrap(mock(MessageInput.class)).config().options().get(ChannelOption.RCVBUF_ALLOCATOR);
    assertThat(recvByteBufAllocator.newHandle().guess()).isEqualTo(RECV_BUFFER_SIZE);
}