Example usage for io.netty.handler.codec.http2 DefaultHttp2DataFrame DefaultHttp2DataFrame

List of usage examples for io.netty.handler.codec.http2 DefaultHttp2DataFrame DefaultHttp2DataFrame

Introduction

In this page you can find the example usage for io.netty.handler.codec.http2 DefaultHttp2DataFrame DefaultHttp2DataFrame.

Prototype

public DefaultHttp2DataFrame(ByteBuf content, boolean endStream, int padding) 

Source Link

Document

Construct a new data message.

Usage

From source file:org.wso2.carbon.http2.transport.util.Http2FrameListenAdapter.java

License:Open Source License

@Override
public int onDataRead(ChannelHandlerContext ctx, int streamId, ByteBuf data, int padding, boolean endOfStream)
        throws Http2Exception {
    if (log.isDebugEnabled()) {
        log.debug("Http2FrameListenAdapter.onDataRead()");
    }/*from   w ww  .j a v a2  s  .c  o  m*/
    DefaultHttp2DataFrame frame = new DefaultHttp2DataFrame(data, endOfStream, padding);
    frame.setStreamId(streamId);
    ctx.fireChannelRead(frame);
    return super.onDataRead(ctx, streamId, data, padding, endOfStream);
}