@UnstableApi public final class SmtpRequestEncoder extends MessageToMessageEncoder<java.lang.Object>
ChannelHandler.Sharable
Constructor and Description |
---|
SmtpRequestEncoder() |
Modifier and Type | Method and Description |
---|---|
boolean |
acceptOutboundMessage(java.lang.Object msg)
如果应该处理给定的消息,则返回
true 。
|
protected void |
encode(ChannelHandlerContext ctx, java.lang.Object msg, java.util.List<java.lang.Object> out)
从一条消息编码到另一条消息。
|
write
bind, close, connect, deregister, disconnect, flush, read
ensureNotSharable, exceptionCaught, handlerAdded, handlerRemoved, isSharable
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
exceptionCaught, handlerAdded, handlerRemoved
public boolean acceptOutboundMessage(java.lang.Object msg) throws java.lang.Exception
MessageToMessageEncoder
true
。
如果false
它将传递到ChannelPipeline
中的下一个ChannelOutboundHandler
。
acceptOutboundMessage
在课堂上
MessageToMessageEncoder<java.lang.Object>
java.lang.Exception
protected void encode(ChannelHandlerContext ctx, java.lang.Object msg, java.util.List<java.lang.Object> out) throws java.lang.Exception
MessageToMessageEncoder
encode
在课堂上
MessageToMessageEncoder<java.lang.Object>
ctx
- MessageToMessageEncoder
所属的ChannelHandlerContext
msg
- 要编码到另一个的消息
out
- 应该添加编码味精的
List
需要做某种聚合
java.lang.Exception
- 如果发生错误则抛出
Copyright © 2008–2018 The Netty Project. All rights reserved.