public class SocksAuthRequestDecoder extends ReplayingDecoder<SocksAuthRequestDecoder.State>
ChannelBuffers into SocksAuthRequest.
Before returning SocksRequest decoder removes itself from pipeline.| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
SocksAuthRequestDecoder.State |
ChannelHandler.Sharable| Modifier and Type | Field and Description |
|---|---|
private int |
fieldLength |
private SocksRequest |
msg |
private java.lang.String |
password |
private java.lang.String |
username |
private SocksMessage.SubnegotiationVersion |
version |
cumulation, DEFAULT_MAX_COMPOSITEBUFFER_COMPONENTS| Constructor and Description |
|---|
SocksAuthRequestDecoder() |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.Object |
decode(ChannelHandlerContext ctx,
Channel channel,
ChannelBuffer buffer,
SocksAuthRequestDecoder.State state)
Decodes the received packets so far into a frame.
|
checkpoint, checkpoint, cleanup, decode, decodeLast, decodeLast, getState, internalBuffer, messageReceived, setStateactualReadableBytes, afterAdd, afterRemove, appendToCumulation, beforeAdd, beforeRemove, channelClosed, channelDisconnected, exceptionCaught, extractFrame, getMaxCumulationBufferCapacity, getMaxCumulationBufferComponents, isUnfold, newCumulationBuffer, replace, setMaxCumulationBufferCapacity, setMaxCumulationBufferComponents, setUnfold, unfoldAndFireMessageReceived, updateCumulationchannelBound, channelConnected, channelInterestChanged, channelOpen, channelUnbound, childChannelClosed, childChannelOpen, handleUpstream, writeCompleteprivate SocksMessage.SubnegotiationVersion version
private int fieldLength
private java.lang.String username
private java.lang.String password
private SocksRequest msg
protected java.lang.Object decode(ChannelHandlerContext ctx, Channel channel, ChannelBuffer buffer, SocksAuthRequestDecoder.State state) throws java.lang.Exception
ReplayingDecoderdecode in class ReplayingDecoder<SocksAuthRequestDecoder.State>ctx - the context of this handlerchannel - the current channelbuffer - the cumulative buffer of received packets so far.
Note that the buffer might be empty, which means you
should not make an assumption that the buffer contains
at least one byte in your decoder implementation.state - the current decoder state (null if unused)java.lang.Exception