| 程序包 | 说明 |
|---|---|
| io.netty.bootstrap |
The helper classes with fluent API which enable an easy implementation of
typical client side and server side channel initialization.
|
| io.netty.util |
Utility classes used across multiple packages.
|
| 限定符和类型 | 方法和说明 |
|---|---|
<T> B |
AbstractBootstrap.attr(AttributeKey<T> key,
T value)
Allow to specify an initial attribute of the newly created
Channel. |
<T> ServerBootstrap |
ServerBootstrap.childAttr(AttributeKey<T> childKey,
T value)
Set the specific
AttributeKey with the given value on every child Channel. |
| 限定符和类型 | 方法和说明 |
|---|---|
AttributeKey<T> |
Attribute.key()
Returns the key of this attribute.
|
static <T> AttributeKey<T> |
AttributeKey.newInstance(java.lang.String name)
Creates a new
AttributeKey for the given or fail with an
IllegalArgumentException if a AttributeKey for the given exists. |
static <T> AttributeKey<T> |
AttributeKey.valueOf(java.lang.String name)
Creates a new
AttributeKey with the specified or return the already existing
AttributeKey for the given name. |
| 限定符和类型 | 方法和说明 |
|---|---|
<T> Attribute<T> |
DefaultAttributeMap.attr(AttributeKey<T> key) |
<T> Attribute<T> |
AttributeMap.attr(AttributeKey<T> key)
Get the
Attribute for the given AttributeKey. |