Top Description Inners Fields Constructors Methods
io.netty.handler.codec.socksx.v5

public Class Socks5CommandRequestDecoder

extends ReplayingDecoder<Socks5CommandRequestDecoder.State>
Class Inheritance
Imports
io.netty.buffer.ByteBuf, .ByteBufUtil, io.netty.channel.ChannelHandlerContext, io.netty.handler.codec.DecoderException, .DecoderResult, .ReplayingDecoder, io.netty.handler.codec.socksx.SocksVersion, io.netty.handler.codec.socksx.v5.Socks5CommandRequestDecoder.State, io.netty.util.internal.ObjectUtil, .UnstableApi, java.util.List

Decodes a single Socks5CommandRequest from the inbound ByteBufs. On successful decode, this decoder will forward the received data to the next handler, so that other handler can remove or replace this decoder later. On failed decode, this decoder will discard the received data, so that other handler closes the connection later.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum

Field Summary

Modifier and TypeField and Description
private final Socks5AddressDecoder

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
protected void
decode(ChannelHandlerContext ctx, ByteBuf
the ByteBuf from which to read data
in
,
List<Object>
the List to which decoded messages should be added
out
)

Implements abstract io.netty.handler.codec.ByteToMessageDecoder.decode.

Decode the from one ByteBuf to an other.
private void
fail(List<Object> out, Exception cause)

Inherited from io.netty.handler.codec.ReplayingDecoder:
callDecodecheckpointcheckpointstatestate

Field Detail

addressDecoderback to summary
private final Socks5AddressDecoder addressDecoder

Constructor Detail

Socks5CommandRequestDecoderback to summary
public Socks5CommandRequestDecoder()
Socks5CommandRequestDecoderback to summary
public Socks5CommandRequestDecoder(Socks5AddressDecoder addressDecoder)

Method Detail

decodeback to summary
protected void decode(ChannelHandlerContext ctx, ByteBuf in, List<Object> out) throws Exception

Implements abstract io.netty.handler.codec.ByteToMessageDecoder.decode.

Doc from io.netty.handler.codec.ByteToMessageDecoder.decode.

Decode the from one ByteBuf to an other. This method will be called till either the input ByteBuf has nothing to read when return from this method or till nothing was read from the input ByteBuf.

Parameters
ctx:ChannelHandlerContext

the ChannelHandlerContext which this ByteToMessageDecoder belongs to

in:ByteBuf

the ByteBuf from which to read data

out:List<Object>

the List to which decoded messages should be added

Annotations
@Override
Exceptions
Exception:
is thrown if an error occurs
failback to summary
private void fail(List<Object> out, Exception cause)
io.netty.handler.codec.socksx.v5 back to summary

public final Enum Socks5CommandRequestDecoder.State

extends Enum<Socks5CommandRequestDecoder.State>
Class Inheritance
Annotations
@UnstableApi

Field Summary

Modifier and TypeField and Description
public static final Socks5CommandRequestDecoder.State
public static final Socks5CommandRequestDecoder.State
public static final Socks5CommandRequestDecoder.State

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static Socks5CommandRequestDecoder.State
public static Socks5CommandRequestDecoder.State[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

FAILUREback to summary
public static final Socks5CommandRequestDecoder.State FAILURE
INITback to summary
public static final Socks5CommandRequestDecoder.State INIT
SUCCESSback to summary
public static final Socks5CommandRequestDecoder.State SUCCESS

Constructor Detail

Stateback to summary
private State()

Method Detail

valueOfback to summary
public static Socks5CommandRequestDecoder.State valueOf(String name)
valuesback to summary
public static Socks5CommandRequestDecoder.State[] values()