T
- 对于ChannelOption
有效的值的类型
public class ChannelOption<T> extends AbstractConstant<ChannelOption<T>>
ChannelOption
允许以类型安全的方式配置ChannelConfig
。
这ChannelOption
支持取决于实际执行ChannelConfig
,并可能取决于其所属的运输性质。
Modifier | Constructor and Description |
---|---|
protected |
ChannelOption(java.lang.String name)
已过时。
|
Modifier and Type | Method and Description |
---|---|
static boolean |
exists(java.lang.String name)
如果给定的name存在 true 则返回name 。
|
static <T> ChannelOption<T> |
newInstance(java.lang.String name)
创建一个新 ChannelOption 对于给定name 或失败,并IllegalArgumentException 如果ChannelOption 对于给定name 存在。
|
void |
validate(T value)
验证为 ChannelOption 设置的值。
|
static <T> ChannelOption<T> |
valueOf(java.lang.Class<?> firstNameComponent, java.lang.String secondNameComponent)
|
static <T> ChannelOption<T> |
valueOf(java.lang.String name)
返回指定名称的 ChannelOption 。
|
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> 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
@Deprecated public static final ChannelOption<java.lang.Boolean> AUTO_CLOSE
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.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
。
public static <T> ChannelOption<T> valueOf(java.lang.Class<?> firstNameComponent, java.lang.String secondNameComponent)
public static boolean exists(java.lang.String name)
true
则返回name
。
public static <T> ChannelOption<T> newInstance(java.lang.String name)
ChannelOption
对于给定name
或失败,并IllegalArgumentException
如果ChannelOption
对于给定name
存在。
public void validate(T value)
ChannelOption
设置的值。
子类可以覆盖这个特殊检查。
Copyright © 2008–2018 The Netty Project. All rights reserved.