Top Description Constructors Methods
io.vertx.core.http.impl

pack-priv final Class VertxHttpResponseEncoder

extends HttpResponseEncoder
Class Inheritance
Imports
io.netty.buffer.ByteBuf, .Unpooled, io.netty.channel.ChannelHandlerContext, .DefaultFileRegion, io.netty.handler.codec.http.DefaultFullHttpResponse, .DefaultHttpContent, .HttpHeaders, .HttpResponse, .HttpResponseEncoder, .LastHttpContent, io.vertx.core.http.impl.headers.HeadersMultiMap

io.netty.handler.codec.http.HttpResponseEncoder which forces the usage of direct buffers for max performance.
Author
Norman Maurer

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public boolean
acceptOutboundMessage(Object msg)

Overrides io.netty.handler.codec.http.HttpResponseEncoder.acceptOutboundMessage.

Returns true if the given message should be handled.

protected void
public void
handlerAdded(ChannelHandlerContext ctx)

Overrides io.netty.channel.ChannelHandlerAdapter.handlerAdded.

Implements io.netty.channel.ChannelHandler.handlerAdded.

Gets called after the ChannelHandler was added to the actual context and it's ready to handle events.

protected boolean
isContentAlwaysEmpty(HttpResponse
the message to test
msg
)

Overrides io.netty.handler.codec.http.HttpResponseEncoder.isContentAlwaysEmpty.

Determine whether a message has a content or not.

Inherited from io.netty.handler.codec.http.HttpResponseEncoder:
encodeInitialLinesanitizeHeadersBeforeEncode

Constructor Detail

VertxHttpResponseEncoderback to summary
pack-priv VertxHttpResponseEncoder()

Method Detail

acceptOutboundMessageback to summary
public boolean acceptOutboundMessage(Object msg) throws Exception

Overrides io.netty.handler.codec.http.HttpResponseEncoder.acceptOutboundMessage.

Doc from io.netty.handler.codec.MessageToMessageEncoder.acceptOutboundMessage.

Returns true if the given message should be handled. If false it will be passed to the next ChannelOutboundHandler in the ChannelPipeline.

Annotations
@Override
encodeHeadersback to summary
protected void encodeHeaders(HttpHeaders headers, ByteBuf buf)

Overrides io.netty.handler.codec.http.HttpObjectEncoder.encodeHeaders.

Doc from io.netty.handler.codec.http.HttpObjectEncoder.encodeHeaders.

Encode the HttpHeaders into a ByteBuf.

Annotations
@Override
handlerAddedback to summary
public void handlerAdded(ChannelHandlerContext ctx) throws Exception

Overrides io.netty.channel.ChannelHandlerAdapter.handlerAdded.

Implements io.netty.channel.ChannelHandler.handlerAdded.

Doc from io.netty.channel.ChannelHandler.handlerAdded.

Gets called after the ChannelHandler was added to the actual context and it's ready to handle events.

Annotations
@Override
isContentAlwaysEmptyback to summary
protected boolean isContentAlwaysEmpty(HttpResponse msg)

Overrides io.netty.handler.codec.http.HttpResponseEncoder.isContentAlwaysEmpty.

Doc from io.netty.handler.codec.http.HttpObjectEncoder.isContentAlwaysEmpty.

Determine whether a message has a content or not. Some message may have headers indicating a content without having an actual content, e.g the response to an HEAD or CONNECT request.

Parameters
msg:HttpResponse

the message to test

Returns:boolean

true to signal the message has no content

Annotations
@Override