public class HttpResponseEncoder extends HttpObjectEncoder<HttpResponse>
ChannelHandler.Sharable| 构造器和说明 |
|---|
HttpResponseEncoder() |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
acceptOutboundMessage(java.lang.Object msg)
Returns
true if the given message should be handled. |
protected void |
encodeInitialLine(ByteBuf buf,
HttpResponse response) |
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.
|
encode, encodeAscii, encodeHeaders, writebind, close, connect, deregister, disconnect, flush, readensureNotSharable, exceptionCaught, handlerAdded, handlerRemoved, isSharableclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitexceptionCaught, handlerAdded, handlerRemovedpublic boolean acceptOutboundMessage(java.lang.Object msg)
throws java.lang.Exception
MessageToMessageEncodertrue if the given message should be handled. If false it will be passed to the next
ChannelOutboundHandler in the ChannelPipeline.acceptOutboundMessage 在类中 HttpObjectEncoder<HttpResponse>java.lang.Exceptionprotected void encodeInitialLine(ByteBuf buf, HttpResponse response) throws java.lang.Exception
encodeInitialLine 在类中 HttpObjectEncoder<HttpResponse>java.lang.Exceptionprotected void sanitizeHeadersBeforeEncode(HttpResponse msg, boolean isAlwaysEmpty)
HttpObjectEncoderprotected boolean isContentAlwaysEmpty(HttpResponse msg)
HttpObjectEncoderisContentAlwaysEmpty 在类中 HttpObjectEncoder<HttpResponse>msg - the message to testtrue to signal the message has no content