public class HttpResponseEncoder extends HttpObjectEncoder<HttpResponse>
ChannelHandler.Sharable| Constructor and Description |
|---|
HttpResponseEncoder() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
acceptOutboundMessage(java.lang.Object msg)
如果应该处理给定的消息,则返回
true 。
|
protected void |
encodeInitialLine(ByteBuf buf, HttpResponse response) |
protected boolean |
isContentAlwaysEmpty(HttpResponse msg)
确定消息是否包含内容。
|
protected void |
sanitizeHeadersBeforeEncode(HttpResponse msg, boolean isAlwaysEmpty)
允许在编码这些消息之前清理消息的标题。
|
encode, encodeAscii, encodeHeaderswritebind, 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
MessageToMessageEncoder
true 。
如果false它将被传递到ChannelOutboundHandler中的下一个ChannelOutboundHandler 。
acceptOutboundMessage在课堂上
HttpObjectEncoder<HttpResponse>
java.lang.Exception
protected void encodeInitialLine(ByteBuf buf, HttpResponse response) throws java.lang.Exception
encodeInitialLine在课堂上
HttpObjectEncoder<HttpResponse>
java.lang.Exception
protected void sanitizeHeadersBeforeEncode(HttpResponse msg, boolean isAlwaysEmpty)
HttpObjectEncoder
protected boolean isContentAlwaysEmpty(HttpResponse msg)
HttpObjectEncoder
isContentAlwaysEmpty在课堂上
HttpObjectEncoder<HttpResponse>
msg - 要测试的消息
true to signal the message has no content
Copyright © 2008–2018 The Netty Project. All rights reserved.