Class SocksMessageEncoder
java.lang.Object
org.jboss.netty.handler.codec.oneone.OneToOneEncoder
org.jboss.netty.handler.codec.socks.SocksMessageEncoder
- All Implemented Interfaces:
ChannelDownstreamHandler, ChannelHandler
Encodes an
SocksMessage into a ChannelBuffer.
OneToOneEncoder implementation.
Use this with SocksInitRequest, SocksInitResponse, SocksAuthRequest,
SocksAuthResponse, SocksCmdRequest and SocksCmdResponse-
Nested Class Summary
Nested classes/interfaces inherited from interface ChannelHandler
ChannelHandler.Sharable -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Objectencode(ChannelHandlerContext ctx, Channel channel, Object msg) Transforms the specified message into another message and return the transformed message.Methods inherited from class OneToOneEncoder
doEncode, handleDownstream
-
Field Details
-
DEFAULT_ENCODER_BUFFER_SIZE
private static final int DEFAULT_ENCODER_BUFFER_SIZE- See Also:
-
-
Constructor Details
-
SocksMessageEncoder
public SocksMessageEncoder()
-
-
Method Details
-
encode
Description copied from class:OneToOneEncoderTransforms the specified message into another message and return the transformed message. Note that you can not returnnull, unlike you can inOneToOneDecoder.decode(ChannelHandlerContext, Channel, Object); you must return something, at leastChannelBuffers.EMPTY_BUFFER.- Specified by:
encodein classOneToOneEncoder- Throws:
Exception
-