public interface PipeContext
NetChannel has a PipeContext.| 限定符和类型 | 字段和说明 |
|---|---|
static String |
CURRENT_PIPE_STACK_DEPTH |
static String |
CURRENT_PIPE_STACK_NAME |
static String |
SO_CHANNEL_RETRY_CNT |
| 限定符和类型 | 方法和说明 |
|---|---|
<T> T |
context(Class<T> attachment)
Get the attachment for
PipeContext |
<T> T |
context(Class<T> attachmentType,
T attachment)
bind attachment to
PipeContext |
<T> T |
flash(String key)
Get flash for current Pipe event.
|
<T> T |
flash(String key,
T flash)
set flash to current
PipeContext, the flash event. |
net.hasor.cobble.concurrent.future.Future<?> |
flush()
Refresh the protocol stack, the event propagates backward from the current protocol layer
|
SoChannel<?> |
getChannel()
the channel
|
SoConfig |
getConfig()
global config
|
SoContext |
getSoContext()
the SoContext
|
default boolean |
isRcvFull()
receive buffer full
|
net.hasor.cobble.concurrent.future.Future<?> |
sendData(Object writeData)
write data to protocol stack, the event propagates backward from the current protocol layer
|
static final String CURRENT_PIPE_STACK_NAME
static final String CURRENT_PIPE_STACK_DEPTH
static final String SO_CHANNEL_RETRY_CNT
SoConfig getConfig()
SoChannel<?> getChannel()
SoContext getSoContext()
<T> T context(Class<T> attachment)
PipeContextdefault boolean isRcvFull()
<T> T context(Class<T> attachmentType, T attachment)
PipeContext<T> T flash(String key)
<T> T flash(String key, T flash)
PipeContext, the flash event.
flash has a very short lifetime and will be automatically cleaned up after a full PipeLayer protocol stack is processed
if you need long-term storage Usecontext(Class, Object)net.hasor.cobble.concurrent.future.Future<?> sendData(Object writeData) throws IOException
IOExceptionnet.hasor.cobble.concurrent.future.Future<?> flush()
throws IOException
IOExceptionCopyright © 2022–2024. All rights reserved.