public abstract class HttpMessageEncoder extends OneToOneEncoder
HttpMessage
or an HttpChunk
into
a ChannelBuffer
.
ChannelHandler.Sharable
Modifier | Constructor and Description |
---|---|
protected |
HttpMessageEncoder()
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
protected Object |
encode(ChannelHandlerContext ctx,
Channel channel,
Object msg)
Transforms the specified message into another message and return the
transformed message.
|
protected static void |
encodeAscii(String s,
ChannelBuffer buf) |
protected abstract void |
encodeInitialLine(ChannelBuffer buf,
HttpMessage message) |
doEncode, handleDownstream
protected Object encode(ChannelHandlerContext ctx, Channel channel, Object msg) throws Exception
OneToOneEncoder
null
, unlike
you can in OneToOneDecoder.decode(ChannelHandlerContext, Channel, Object)
;
you must return something, at least ChannelBuffers.EMPTY_BUFFER
.encode
in class OneToOneEncoder
Exception
protected static void encodeAscii(String s, ChannelBuffer buf)
protected abstract void encodeInitialLine(ChannelBuffer buf, HttpMessage message) throws Exception
Exception
Copyright © 2008-2016 The Netty Project. All Rights Reserved.