Example usage for io.netty.handler.codec.http DefaultLastHttpContent trailingHeaders

List of usage examples for io.netty.handler.codec.http DefaultLastHttpContent trailingHeaders

Introduction

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

Prototype

HttpHeaders trailingHeaders

To view the source code for io.netty.handler.codec.http DefaultLastHttpContent trailingHeaders.

Click Source Link

Usage

From source file:io.apigee.trireme.container.netty.NettyHttpResponse.java

License:Open Source License

private ChannelFuture sendLastChunk() {
    if (log.isDebugEnabled()) {
        log.debug("send: Sending last HTTP chunk");
    }/*from  ww  w .  ja  v a  2s  .c om*/
    DefaultLastHttpContent chunk = new DefaultLastHttpContent();
    if ((trailers != null) && !isOlderHttpVersion()) {
        for (Map.Entry<String, String> t : trailers) {
            chunk.trailingHeaders().add(t.getKey(), t.getValue());
        }
    }
    ChannelFuture ret = channel.write(chunk);
    return ret;
}