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.限定符 | 构造器和说明 |
---|---|
protected |
ChannelOption(java.lang.String name)
已过时。
|
限定符和类型 | 方法和说明 |
---|---|
static boolean |
exists(java.lang.String name)
|
static <T> ChannelOption<T> |
newInstance(java.lang.String name)
已过时。
use
valueOf(String) . |
void |
validate(T value)
Validate the value which is set for the
ChannelOption . |
static <T> ChannelOption<T> |
valueOf(java.lang.Class<?> firstNameComponent,
java.lang.String secondNameComponent)
|
static <T> ChannelOption<T> |
valueOf(java.lang.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<java.lang.Integer> CONNECT_TIMEOUT_MILLIS
@Deprecated public static final ChannelOption<java.lang.Integer> MAX_MESSAGES_PER_READ
public static final ChannelOption<java.lang.Integer> MAX_MESSAGES_PER_WRITE
public static final ChannelOption<java.lang.Integer> WRITE_SPIN_COUNT
@Deprecated public static final ChannelOption<java.lang.Integer> WRITE_BUFFER_HIGH_WATER_MARK
WRITE_BUFFER_WATER_MARK
@Deprecated public static final ChannelOption<java.lang.Integer> WRITE_BUFFER_LOW_WATER_MARK
WRITE_BUFFER_WATER_MARK
public static final ChannelOption<WriteBufferWaterMark> WRITE_BUFFER_WATER_MARK
public static final ChannelOption<java.lang.Boolean> ALLOW_HALF_CLOSURE
public static final ChannelOption<java.lang.Boolean> AUTO_READ
public static final ChannelOption<java.lang.Boolean> AUTO_CLOSE
true
then the Channel
is closed automatically and immediately on write failure.
The default value is true
.public static final ChannelOption<java.lang.Boolean> SO_BROADCAST
public static final ChannelOption<java.lang.Boolean> SO_KEEPALIVE
public static final ChannelOption<java.lang.Integer> SO_SNDBUF
public static final ChannelOption<java.lang.Integer> SO_RCVBUF
public static final ChannelOption<java.lang.Boolean> SO_REUSEADDR
public static final ChannelOption<java.lang.Integer> SO_LINGER
public static final ChannelOption<java.lang.Integer> SO_BACKLOG
public static final ChannelOption<java.lang.Integer> SO_TIMEOUT
public static final ChannelOption<java.lang.Integer> IP_TOS
public static final ChannelOption<java.net.InetAddress> IP_MULTICAST_ADDR
public static final ChannelOption<java.net.NetworkInterface> IP_MULTICAST_IF
public static final ChannelOption<java.lang.Integer> IP_MULTICAST_TTL
public static final ChannelOption<java.lang.Boolean> IP_MULTICAST_LOOP_DISABLED
public static final ChannelOption<java.lang.Boolean> TCP_NODELAY
public static final ChannelOption<java.lang.Boolean> TCP_FASTOPEN_CONNECT
public static final ChannelOption<java.lang.Integer> TCP_FASTOPEN
@Deprecated public static final ChannelOption<java.lang.Boolean> DATAGRAM_CHANNEL_ACTIVE_ON_REGISTRATION
public static final ChannelOption<java.lang.Boolean> SINGLE_EVENTEXECUTOR_PER_GROUP
public static <T> ChannelOption<T> valueOf(java.lang.String name)
ChannelOption
of the specified name.public static <T> ChannelOption<T> valueOf(java.lang.Class<?> firstNameComponent, java.lang.String secondNameComponent)
public static boolean exists(java.lang.String name)
@Deprecated public static <T> ChannelOption<T> newInstance(java.lang.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.