Package io.netty.handler.codec.http
Class HttpServerCodec.HttpServerResponseEncoder
- java.lang.Object
-
- io.netty.channel.ChannelHandlerAdapter
-
- io.netty.channel.ChannelOutboundHandlerAdapter
-
- io.netty.handler.codec.MessageToMessageEncoder<java.lang.Object>
-
- io.netty.handler.codec.http.HttpObjectEncoder<HttpResponse>
-
- io.netty.handler.codec.http.HttpResponseEncoder
-
- io.netty.handler.codec.http.HttpServerCodec.HttpServerResponseEncoder
-
- All Implemented Interfaces:
ChannelHandler
,ChannelOutboundHandler
- Enclosing class:
- HttpServerCodec
private final class HttpServerCodec.HttpServerResponseEncoder extends HttpResponseEncoder
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
ChannelHandler.Sharable
-
-
Field Summary
Fields Modifier and Type Field Description private HttpMethod
method
-
Fields inherited from class io.netty.handler.codec.http.HttpObjectEncoder
CRLF_SHORT
-
-
Constructor Summary
Constructors Modifier Constructor Description private
HttpServerResponseEncoder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
isContentAlwaysEmpty(HttpResponse msg)
Determine whether a message has a content or not.protected void
sanitizeHeadersBeforeEncode(HttpResponse msg, boolean isAlwaysEmpty)
Allows to sanitize headers of the message before encoding these.-
Methods inherited from class io.netty.handler.codec.http.HttpResponseEncoder
acceptOutboundMessage, encodeInitialLine
-
Methods inherited from class io.netty.handler.codec.http.HttpObjectEncoder
encode, encodeAscii, encodeHeaders
-
Methods inherited from class io.netty.handler.codec.MessageToMessageEncoder
write
-
Methods inherited from class io.netty.channel.ChannelOutboundHandlerAdapter
bind, close, connect, deregister, disconnect, flush, read
-
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, exceptionCaught, handlerAdded, handlerRemoved, isSharable
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.netty.channel.ChannelHandler
exceptionCaught, handlerAdded, handlerRemoved
-
-
-
-
Field Detail
-
method
private HttpMethod method
-
-
Method Detail
-
sanitizeHeadersBeforeEncode
protected void sanitizeHeadersBeforeEncode(HttpResponse msg, boolean isAlwaysEmpty)
Description copied from class:HttpObjectEncoder
Allows to sanitize headers of the message before encoding these.- Overrides:
sanitizeHeadersBeforeEncode
in classHttpResponseEncoder
-
isContentAlwaysEmpty
protected boolean isContentAlwaysEmpty(HttpResponse msg)
Description copied from class:HttpObjectEncoder
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.- Overrides:
isContentAlwaysEmpty
in classHttpResponseEncoder
- Parameters:
msg
- the message to test- Returns:
true
to signal the message has no content
-
-