Example usage for io.netty.handler.codec.http DefaultFullHttpRequest refCnt

List of usage examples for io.netty.handler.codec.http DefaultFullHttpRequest refCnt

Introduction

In this page you can find the example usage for io.netty.handler.codec.http DefaultFullHttpRequest refCnt.

Prototype

@Override
    public int refCnt() 

Source Link

Usage

From source file:com.corundumstudio.socketio.handler.AuthorizeHandlerTest.java

License:Apache License

@Test
public void shouldAuthorizeRequest() throws Exception {
    prepareAuthorizationListener(true, null);

    channel.writeInbound(new DefaultFullHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.GET, TEST_URI));
    // then/*from www  . ja  v a 2 s  . c o m*/
    Object in = channel.readInbound();
    assertTrue(in instanceof DefaultFullHttpRequest);
    DefaultFullHttpRequest req = (DefaultFullHttpRequest) in;
    assertEquals(1, req.refCnt());

}