public class PipeContextImpl extends Object implements PipeContext
CURRENT_PIPE_STACK_DEPTH, CURRENT_PIPE_STACK_NAME, SO_CHANNEL_RETRY_CNT| 限定符 | 构造器和说明 |
|---|---|
protected |
PipeContextImpl(SoChannel<?> channel,
SoContext soContext) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
clearFlash() |
<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
|
net.hasor.cobble.concurrent.future.Future<?> |
sendData(Object writeData)
write data to protocol stack, the event propagates backward from the current protocol layer
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisRcvFullpublic SoConfig getConfig()
PipeContextgetConfig 在接口中 PipeContextpublic SoChannel<?> getChannel()
PipeContextgetChannel 在接口中 PipeContextpublic SoContext getSoContext()
PipeContextgetSoContext 在接口中 PipeContextpublic <T> T context(Class<T> attachment)
PipeContextPipeContextcontext 在接口中 PipeContextpublic <T> T context(Class<T> attachmentType, T attachment)
PipeContextPipeContextcontext 在接口中 PipeContextpublic void clearFlash()
public <T> T flash(String key)
PipeContextflash 在接口中 PipeContextpublic <T> T flash(String key, T flash)
PipeContextPipeContext, 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 UsePipeContext.context(Class, Object)flash 在接口中 PipeContextpublic net.hasor.cobble.concurrent.future.Future<?> sendData(Object writeData) throws IOException
PipeContextsendData 在接口中 PipeContextIOExceptionpublic net.hasor.cobble.concurrent.future.Future<?> flush()
throws IOException
PipeContextflush 在接口中 PipeContextIOExceptionCopyright © 2022–2024. All rights reserved.