@ChannelHandler.Sharable public class SocksMessageEncoder extends OneToOneEncoder
SocksMessage
into a ChannelBuffer
.
OneToOneEncoder
implementation.
Use this with SocksInitRequest
, SocksInitResponse
, SocksAuthRequest
,
SocksAuthResponse
, SocksCmdRequest
and SocksCmdResponse
ChannelHandler.Sharable
Constructor and Description |
---|
SocksMessageEncoder() |
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.
|
static String |
getName() |
doEncode, handleDownstream
public static String getName()
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
Copyright © 2008-2014 The Netty Project. All Rights Reserved.