public interface NettyInbound extends Inbound<ByteBuf>
Channel
Modifier and Type | Method and Description |
---|---|
default <T> Attribute<T> |
attr(AttributeKey<T> key)
Return a pre-configured attribute stored in every inbound channel
|
NettyContext |
context()
Return a
NettyContext to operate on the underlying
Channel state. |
default NettyInbound |
context(java.util.function.Consumer<NettyContext> contextCallback)
Immediately call the passed callback with a
NettyContext to operate on the
underlying
Channel state. |
default NettyInbound |
onReadIdle(long idleTimeout,
Runnable onReadIdle)
Assign a
Runnable to be invoked when reads have become idle for the given
timeout. |
default ByteBufFlux |
receive()
A
Flux extension that allows for extra decoding operators |
Flux<?> |
receiveObject()
a Object inbound
Flux |
default InetSocketAddress |
remoteAddress()
Get the address of the remote peer.
|
default <T> Attribute<T> attr(AttributeKey<T> key)
T
- a channel attribute typekey
- attribute keyChannel
attributeAttributeMap.attr(AttributeKey)
NettyContext context()
NettyContext
to operate on the underlying
Channel
state.NettyContext
default NettyInbound context(java.util.function.Consumer<NettyContext> contextCallback)
NettyContext
to operate on the
underlying
Channel
state. This allows for chaining inbound API.contextCallback
- context callbackNettyContext
default NettyInbound onReadIdle(long idleTimeout, Runnable onReadIdle)
Runnable
to be invoked when reads have become idle for the given
timeout. This replaces any previously set idle callback.idleTimeout
- the idle timeoutonReadIdle
- the idle timeout handlerdefault ByteBufFlux receive()
Flux
extension that allows for extra decoding operatorsreceive
in interface Inbound<ByteBuf>
ByteBufFlux
default InetSocketAddress remoteAddress()