public abstract class MessageEncoder
extends org.jboss.netty.channel.SimpleChannelDownstreamHandler
Modifier | Constructor and Description |
---|---|
protected |
MessageEncoder() |
Modifier and Type | Method and Description |
---|---|
protected abstract org.jboss.netty.buffer.ChannelBuffer |
encode(Message originalMessage)
Transforms the specified message into another message and return the
transformed message.
|
void |
handleDownstream(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.ChannelEvent evt) |
public void handleDownstream(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.ChannelEvent evt) throws Exception
handleDownstream
in interface org.jboss.netty.channel.ChannelDownstreamHandler
handleDownstream
in class org.jboss.netty.channel.SimpleChannelDownstreamHandler
Exception
protected abstract org.jboss.netty.buffer.ChannelBuffer encode(Message originalMessage)
null
, unlike
you can in
MessageDecoder#decode(org.jboss.netty.buffer.ChannelBuffer)
; you
must return something, at least ChannelBuffers.EMPTY_BUFFER
.Copyright © 2018. All rights reserved.