T
- the type of the value which is valid for the ChannelOption
public class ChannelOption<T> extends UniqueName
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.限定符和类型 | 字段和说明 |
---|---|
static ChannelOption<java.lang.Long> |
AIO_READ_TIMEOUT
已过时。
|
static ChannelOption<java.lang.Long> |
AIO_WRITE_TIMEOUT
已过时。
|
static ChannelOption<ByteBufAllocator> |
ALLOCATOR |
static ChannelOption<java.lang.Boolean> |
ALLOW_HALF_CLOSURE |
static ChannelOption<java.lang.Boolean> |
AUTO_CLOSE
已过时。
Auto close will be removed in a future release.
If
true then the Channel is closed automatically and immediately on write failure.
The default value is true . |
static ChannelOption<java.lang.Boolean> |
AUTO_READ |
static ChannelOption<java.lang.Integer> |
CONNECT_TIMEOUT_MILLIS |
static ChannelOption<java.lang.Boolean> |
DATAGRAM_CHANNEL_ACTIVE_ON_REGISTRATION
已过时。
|
static ChannelOption<java.net.InetAddress> |
IP_MULTICAST_ADDR |
static ChannelOption<java.net.NetworkInterface> |
IP_MULTICAST_IF |
static ChannelOption<java.lang.Boolean> |
IP_MULTICAST_LOOP_DISABLED |
static ChannelOption<java.lang.Integer> |
IP_MULTICAST_TTL |
static ChannelOption<java.lang.Integer> |
IP_TOS |
static ChannelOption<java.lang.Integer> |
MAX_MESSAGES_PER_READ |
static ChannelOption<MessageSizeEstimator> |
MESSAGE_SIZE_ESTIMATOR |
static ChannelOption<RecvByteBufAllocator> |
RCVBUF_ALLOCATOR |
static ChannelOption<java.lang.Boolean> |
SINGLE_EVENTEXECUTOR_PER_GROUP |
static ChannelOption<java.lang.Integer> |
SO_BACKLOG |
static ChannelOption<java.lang.Boolean> |
SO_BROADCAST |
static ChannelOption<java.lang.Boolean> |
SO_KEEPALIVE |
static ChannelOption<java.lang.Integer> |
SO_LINGER |
static ChannelOption<java.lang.Integer> |
SO_RCVBUF |
static ChannelOption<java.lang.Boolean> |
SO_REUSEADDR |
static ChannelOption<java.lang.Integer> |
SO_SNDBUF |
static ChannelOption<java.lang.Integer> |
SO_TIMEOUT |
static ChannelOption<java.lang.Boolean> |
TCP_NODELAY |
static ChannelOption<java.lang.Integer> |
WRITE_BUFFER_HIGH_WATER_MARK |
static ChannelOption<java.lang.Integer> |
WRITE_BUFFER_LOW_WATER_MARK |
static ChannelOption<java.lang.Integer> |
WRITE_SPIN_COUNT |
限定符 | 构造器和说明 |
---|---|
protected |
ChannelOption(java.lang.String name)
已过时。
Use
valueOf(String) instead. |
限定符和类型 | 方法和说明 |
---|---|
static boolean |
exists(java.lang.String name)
|
static <T> ChannelOption<T> |
newInstance(java.lang.String name)
Creates a new
ChannelOption for the given or fail with an
IllegalArgumentException if a ChannelOption for the given exists. |
void |
validate(T value)
Validate the value which is set for the
ChannelOption . |
static <T> ChannelOption<T> |
valueOf(java.lang.String name)
Creates a new
ChannelOption with the specified or return the already existing
ChannelOption for the given name. |
compareTo, equals, hashCode, id, name, toString, validateArgs
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
public static final ChannelOption<java.lang.Integer> MAX_MESSAGES_PER_READ
public static final ChannelOption<java.lang.Integer> WRITE_SPIN_COUNT
public static final ChannelOption<java.lang.Integer> WRITE_BUFFER_HIGH_WATER_MARK
public static final ChannelOption<java.lang.Integer> WRITE_BUFFER_LOW_WATER_MARK
public static final ChannelOption<java.lang.Boolean> ALLOW_HALF_CLOSURE
public static final ChannelOption<java.lang.Boolean> AUTO_READ
@Deprecated 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
@Deprecated public static final ChannelOption<java.lang.Long> AIO_READ_TIMEOUT
@Deprecated public static final ChannelOption<java.lang.Long> AIO_WRITE_TIMEOUT
@Deprecated public static final ChannelOption<java.lang.Boolean> DATAGRAM_CHANNEL_ACTIVE_ON_REGISTRATION
public static final ChannelOption<java.lang.Boolean> SINGLE_EVENTEXECUTOR_PER_GROUP
@Deprecated protected ChannelOption(java.lang.String name)
valueOf(String)
instead.public static <T> ChannelOption<T> valueOf(java.lang.String name)
ChannelOption
with the specified or return the already existing
ChannelOption
for the given name.public static boolean exists(java.lang.String name)
public static <T> ChannelOption<T> newInstance(java.lang.String name)
ChannelOption
for the given or fail with an
IllegalArgumentException
if a ChannelOption
for the given exists.public void validate(T value)
ChannelOption
. Sub-classes
may override this for special checks.