@ChannelHandler.Sharable public class SocksMessageEncoder extends OneToOneEncoder
SocksMessage into a ChannelBuffer.
OneToOneEncoder implementation.
Use this with SocksInitRequest, SocksInitResponse, SocksAuthRequest,
SocksAuthResponse, SocksCmdRequest and SocksCmdResponseChannelHandler.Sharable| Modifier and Type | Field and Description |
|---|---|
private static int |
DEFAULT_ENCODER_BUFFER_SIZE |
| Constructor and Description |
|---|
SocksMessageEncoder() |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.Object |
encode(ChannelHandlerContext ctx,
Channel channel,
java.lang.Object msg)
Transforms the specified message into another message and return the
transformed message.
|
doEncode, handleDownstreamprivate static final int DEFAULT_ENCODER_BUFFER_SIZE
protected java.lang.Object encode(ChannelHandlerContext ctx, Channel channel, java.lang.Object msg) throws java.lang.Exception
OneToOneEncodernull, unlike
you can in OneToOneDecoder.decode(ChannelHandlerContext, Channel, Object);
you must return something, at least ChannelBuffers.EMPTY_BUFFER.encode in class OneToOneEncoderjava.lang.Exception