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, QuicChannelOption, RxtxChannelOption, SctpChannelOption, UdtChannelOption, 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> Iftruethen theChannelis 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> static final ChannelOption<RecvByteBufAllocator> Deprecated.useRECVBUF_ALLOCATOR.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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanstatic <T> ChannelOption<T> newInstance(String name) Deprecated.usevalueOf(String).voidValidate the value which is set for theChannelOption.static <T> ChannelOption<T> static <T> ChannelOption<T> Returns theChannelOptionof the specified name.
-
Field Details
-
ALLOCATOR
-
RECVBUF_ALLOCATOR
-
RCVBUF_ALLOCATOR
Deprecated.useRECVBUF_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
Iftruethen theChannelis 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
Deprecated.
-
-
Method Details
-
valueOf
Returns theChannelOptionof the specified name. -
valueOf
-
exists
-
newInstance
Deprecated.usevalueOf(String).Creates a newChannelOptionfor the givennameor fail with anIllegalArgumentExceptionif aChannelOptionfor the givennameexists. -
validate
Validate the value which is set for theChannelOption. Sub-classes may override this for special checks.
-
MaxMessagesRecvByteBufAllocatorandMaxMessagesRecvByteBufAllocator.maxMessagesPerRead(int).