- java.lang.Object
-
- io.netty5.util.AbstractConstant<ChannelOption<T>>
-
- io.netty5.channel.ChannelOption<T>
-
- Type Parameters:
T
- the type of the value which is valid for theChannelOption
- All Implemented Interfaces:
Constant<ChannelOption<T>>
,Comparable<ChannelOption<T>>
- Direct Known Subclasses:
NioChannelOption
,UnixChannelOption
public class ChannelOption<T> extends AbstractConstant<ChannelOption<T>>
AChannelOption
allows to configure aChannel
in a type-safe way. WhichChannelOption
is supported depends on the actual implementation ofChannel
and may depend on the nature of the transport it belongs to.
-
-
Field Summary
-
Constructor Summary
Constructors Modifier Constructor Description protected
ChannelOption(String name)
Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static boolean
exists(String name)
static <T> ChannelOption<T>
newInstance(String name)
Deprecated.usevalueOf(String)
.void
validate(T value)
Validate the value which is set for theChannelOption
.static <T> ChannelOption<T>
valueOf(Class<?> firstNameComponent, String secondNameComponent)
static <T> ChannelOption<T>
valueOf(String name)
Returns theChannelOption
of the specified name.
-
-
-
Field Detail
-
BUFFER_ALLOCATOR
public static final ChannelOption<BufferAllocator> BUFFER_ALLOCATOR
-
RCVBUFFER_ALLOCATOR
public static final ChannelOption<RecvBufferAllocator> RCVBUFFER_ALLOCATOR
-
MESSAGE_SIZE_ESTIMATOR
public static final ChannelOption<MessageSizeEstimator> MESSAGE_SIZE_ESTIMATOR
-
CONNECT_TIMEOUT_MILLIS
public static final ChannelOption<Integer> CONNECT_TIMEOUT_MILLIS
-
MAX_MESSAGES_PER_READ
@Deprecated public static final ChannelOption<Integer> MAX_MESSAGES_PER_READ
Deprecated.
-
MAX_MESSAGES_PER_WRITE
public static final ChannelOption<Integer> MAX_MESSAGES_PER_WRITE
-
WRITE_SPIN_COUNT
public static final ChannelOption<Integer> WRITE_SPIN_COUNT
-
WRITE_BUFFER_WATER_MARK
public static final ChannelOption<WriteBufferWaterMark> WRITE_BUFFER_WATER_MARK
-
ALLOW_HALF_CLOSURE
public static final ChannelOption<Boolean> ALLOW_HALF_CLOSURE
-
AUTO_READ
public static final ChannelOption<Boolean> AUTO_READ
-
AUTO_CLOSE
public static final ChannelOption<Boolean> AUTO_CLOSE
Iftrue
then theChannel
is closed automatically and immediately on write failure. The default value istrue
.
-
SO_BROADCAST
public static final ChannelOption<Boolean> SO_BROADCAST
-
SO_KEEPALIVE
public static final ChannelOption<Boolean> SO_KEEPALIVE
-
SO_SNDBUF
public static final ChannelOption<Integer> SO_SNDBUF
-
SO_RCVBUF
public static final ChannelOption<Integer> SO_RCVBUF
-
SO_REUSEADDR
public static final ChannelOption<Boolean> SO_REUSEADDR
-
SO_LINGER
public static final ChannelOption<Integer> SO_LINGER
-
SO_BACKLOG
public static final ChannelOption<Integer> SO_BACKLOG
-
SO_TIMEOUT
public static final ChannelOption<Integer> SO_TIMEOUT
-
IP_TOS
public static final ChannelOption<Integer> IP_TOS
-
IP_MULTICAST_IF
public static final ChannelOption<NetworkInterface> IP_MULTICAST_IF
-
IP_MULTICAST_TTL
public static final ChannelOption<Integer> IP_MULTICAST_TTL
-
IP_MULTICAST_LOOP_DISABLED
public static final ChannelOption<Boolean> IP_MULTICAST_LOOP_DISABLED
-
TCP_NODELAY
public static final ChannelOption<Boolean> TCP_NODELAY
-
TCP_FASTOPEN_CONNECT
public static final ChannelOption<Boolean> TCP_FASTOPEN_CONNECT
Client-side TCP FastOpen. Sending data with the initial TCP handshake.
-
TCP_FASTOPEN
public static final ChannelOption<Integer> TCP_FASTOPEN
Server-side TCP FastOpen. Configures the maximum number of outstanding (waiting to be accepted) TFO connections.
-
DATAGRAM_CHANNEL_ACTIVE_ON_REGISTRATION
public static final ChannelOption<Boolean> DATAGRAM_CHANNEL_ACTIVE_ON_REGISTRATION
-
-
Constructor Detail
-
ChannelOption
@Deprecated protected ChannelOption(String name)
Deprecated.
-
-
Method Detail
-
valueOf
public static <T> ChannelOption<T> valueOf(String name)
Returns theChannelOption
of the specified name.
-
valueOf
public static <T> ChannelOption<T> valueOf(Class<?> firstNameComponent, String secondNameComponent)
-
exists
public static boolean exists(String name)
-
newInstance
@Deprecated public static <T> ChannelOption<T> newInstance(String name)
Deprecated.usevalueOf(String)
.Creates a newChannelOption
for the givenname
or fail with anIllegalArgumentException
if aChannelOption
for the givenname
exists.
-
validate
public void validate(T value)
Validate the value which is set for theChannelOption
. Sub-classes may override this for special checks.
-
-