Package io.netty.channel
Class 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:
Http2StreamChannelOption
,NioChannelOption
,SctpChannelOption
,UnixChannelOption
A
ChannelOption
allows to configure a ChannelConfig
in a type-safe
way. Which ChannelOption
is supported depends on the actual implementation
of ChannelConfig
and may depend on the nature of the transport it belongs
to.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ChannelOption
<ByteBufAllocator> static final ChannelOption
<Boolean> static final ChannelOption
<Boolean> Iftrue
then theChannel
is closed automatically and immediately on write failure.static final ChannelOption
<Boolean> static final ChannelOption
<Integer> static final ChannelOption
<Boolean> Deprecated.static final ChannelOption
<InetAddress> static final ChannelOption
<NetworkInterface> static final ChannelOption
<Boolean> static final ChannelOption
<Integer> static final ChannelOption
<Integer> static final ChannelOption
<Integer> Deprecated.static final ChannelOption
<Integer> static final ChannelOption
<MessageSizeEstimator> private static final ConstantPool
<ChannelOption<Object>> static final ChannelOption
<RecvByteBufAllocator> static final ChannelOption
<Boolean> static final ChannelOption
<Integer> static final ChannelOption
<Boolean> static final ChannelOption
<Boolean> static final ChannelOption
<Integer> static final ChannelOption
<Integer> static final ChannelOption
<Boolean> static final ChannelOption
<Integer> static final ChannelOption
<Integer> static final ChannelOption
<Integer> Server-side TCP FastOpen.static final ChannelOption
<Boolean> Client-side TCP FastOpen.static final ChannelOption
<Boolean> static final ChannelOption
<Integer> Deprecated.static final ChannelOption
<Integer> Deprecated.static final ChannelOption
<WriteBufferWaterMark> static final ChannelOption
<Integer> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
ChannelOption
(int id, String name) Creates a newChannelOption
with the specified uniquename
.protected
ChannelOption
(String name) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
static <T> ChannelOption
<T> newInstance
(String name) Deprecated.usevalueOf(String)
.void
Validate the value which is set for theChannelOption
.static <T> ChannelOption
<T> static <T> ChannelOption
<T> Returns theChannelOption
of the specified name.
-
Field Details
-
pool
-
ALLOCATOR
-
RCVBUF_ALLOCATOR
-
MESSAGE_SIZE_ESTIMATOR
-
CONNECT_TIMEOUT_MILLIS
-
MAX_MESSAGES_PER_READ
Deprecated. -
MAX_MESSAGES_PER_WRITE
-
WRITE_SPIN_COUNT
-
WRITE_BUFFER_HIGH_WATER_MARK
Deprecated. -
WRITE_BUFFER_LOW_WATER_MARK
Deprecated. -
WRITE_BUFFER_WATER_MARK
-
ALLOW_HALF_CLOSURE
-
AUTO_READ
-
AUTO_CLOSE
Iftrue
then theChannel
is closed automatically and immediately on write failure. The default value istrue
. -
SO_BROADCAST
-
SO_KEEPALIVE
-
SO_SNDBUF
-
SO_RCVBUF
-
SO_REUSEADDR
-
SO_LINGER
-
SO_BACKLOG
-
SO_TIMEOUT
-
IP_TOS
-
IP_MULTICAST_ADDR
-
IP_MULTICAST_IF
-
IP_MULTICAST_TTL
-
IP_MULTICAST_LOOP_DISABLED
-
TCP_NODELAY
-
TCP_FASTOPEN_CONNECT
Client-side TCP FastOpen. Sending data with the initial TCP handshake. -
TCP_FASTOPEN
Server-side TCP FastOpen. Configures the maximum number of outstanding (waiting to be accepted) TFO connections. -
DATAGRAM_CHANNEL_ACTIVE_ON_REGISTRATION
Deprecated. -
SINGLE_EVENTEXECUTOR_PER_GROUP
-
-
Constructor Details
-
ChannelOption
Creates a newChannelOption
with the specified uniquename
. -
ChannelOption
Deprecated.
-
-
Method Details
-
valueOf
Returns theChannelOption
of the specified name. -
valueOf
-
exists
-
newInstance
Deprecated.usevalueOf(String)
.Creates a newChannelOption
for the givenname
or fail with anIllegalArgumentException
if aChannelOption
for the givenname
exists. -
validate
Validate the value which is set for theChannelOption
. Sub-classes may override this for special checks.
-
MaxMessagesRecvByteBufAllocator
andMaxMessagesRecvByteBufAllocator.maxMessagesPerRead(int)
.