T
- the type of the value which is valid for the ChannelOption
public class ChannelOption<T> extends AbstractConstant<ChannelOption<T>>
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.Modifier | Constructor and Description |
---|---|
protected |
ChannelOption(String name)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
exists(String name)
|
static <T> ChannelOption<T> |
newInstance(String name)
Deprecated.
use
valueOf(String) . |
void |
validate(T value)
Validate the value which is set for the
ChannelOption . |
static <T> ChannelOption<T> |
valueOf(Class<?> firstNameComponent,
String secondNameComponent)
|
static <T> ChannelOption<T> |
valueOf(String name)
Returns the
ChannelOption of the specified name. |
public static final ChannelOption<ByteBufAllocator> ALLOCATOR
public static final ChannelOption<RecvByteBufAllocator> RCVBUF_ALLOCATOR
public static final ChannelOption<MessageSizeEstimator> MESSAGE_SIZE_ESTIMATOR
public static final ChannelOption<Integer> CONNECT_TIMEOUT_MILLIS
@Deprecated public static final ChannelOption<Integer> MAX_MESSAGES_PER_READ
MaxMessagesRecvByteBufAllocator
and MaxMessagesRecvByteBufAllocator.maxMessagesPerRead(int)
.public static final ChannelOption<Integer> MAX_MESSAGES_PER_WRITE
public static final ChannelOption<Integer> WRITE_SPIN_COUNT
@Deprecated public static final ChannelOption<Integer> WRITE_BUFFER_HIGH_WATER_MARK
WRITE_BUFFER_WATER_MARK
@Deprecated public static final ChannelOption<Integer> WRITE_BUFFER_LOW_WATER_MARK
WRITE_BUFFER_WATER_MARK
public static final ChannelOption<WriteBufferWaterMark> WRITE_BUFFER_WATER_MARK
public static final ChannelOption<Boolean> ALLOW_HALF_CLOSURE
public static final ChannelOption<Boolean> AUTO_READ
public static final ChannelOption<Boolean> AUTO_CLOSE
true
then the Channel
is closed automatically and immediately on write failure.
The default value is true
.public static final ChannelOption<Boolean> SO_BROADCAST
public static final ChannelOption<Boolean> SO_KEEPALIVE
public static final ChannelOption<Integer> SO_SNDBUF
public static final ChannelOption<Integer> SO_RCVBUF
public static final ChannelOption<Boolean> SO_REUSEADDR
public static final ChannelOption<Integer> SO_LINGER
public static final ChannelOption<Integer> SO_BACKLOG
public static final ChannelOption<Integer> SO_TIMEOUT
public static final ChannelOption<Integer> IP_TOS
public static final ChannelOption<InetAddress> IP_MULTICAST_ADDR
public static final ChannelOption<NetworkInterface> IP_MULTICAST_IF
public static final ChannelOption<Integer> IP_MULTICAST_TTL
public static final ChannelOption<Boolean> IP_MULTICAST_LOOP_DISABLED
public static final ChannelOption<Boolean> TCP_NODELAY
public static final ChannelOption<Boolean> TCP_FASTOPEN_CONNECT
public static final ChannelOption<Integer> TCP_FASTOPEN
@Deprecated public static final ChannelOption<Boolean> DATAGRAM_CHANNEL_ACTIVE_ON_REGISTRATION
public static final ChannelOption<Boolean> SINGLE_EVENTEXECUTOR_PER_GROUP
@Deprecated protected ChannelOption(String name)
public static <T> ChannelOption<T> valueOf(String name)
ChannelOption
of the specified name.public static <T> ChannelOption<T> valueOf(Class<?> firstNameComponent, String secondNameComponent)
public static boolean exists(String name)
@Deprecated public static <T> ChannelOption<T> newInstance(String name)
valueOf(String)
.ChannelOption
for the given name
or fail with an
IllegalArgumentException
if a ChannelOption
for the given name
exists.public void validate(T value)
ChannelOption
. Sub-classes
may override this for special checks.Copyright © 2008–2024 The Netty Project. All rights reserved.