public abstract class AbstractPlugin<T> extends Object implements Plugin<T>
| Constructor and Description |
|---|
AbstractPlugin() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
acceptMonitor(AsynchronousSocketChannel channel)
监控已接收到的连接
|
boolean |
preProcess(AioSession<T> session,
T t)
对请求消息进行预处理,并决策是否进行后续的MessageProcessor处理。
若返回false,则当前消息将被忽略。
若返回true,该消息会正常秩序MessageProcessor.process.
|
void |
readMonitor(AioSession<T> session,
int readSize)
监控触发本次读回调Session的已读数据字节数
|
void |
stateEvent(StateMachine stateMachineEnum,
AioSession<T> session,
Throwable throwable) |
void |
writeMonitor(AioSession<T> session,
int writeSize)
监控触发本次写回调session的已写数据字节数
|
public boolean preProcess(AioSession<T> session, T t)
PluginpreProcess in interface Plugin<T>session - 会话t - 对象public void stateEvent(StateMachine stateMachineEnum, AioSession<T> session, Throwable throwable)
stateEvent in interface Plugin<T>stateMachineEnum - 状态session - 会话throwable - 线程public boolean acceptMonitor(AsynchronousSocketChannel channel)
NetMonitor监控已接收到的连接
acceptMonitor in interface NetMonitor<T>channel - 当前已经建立连接的通道对象public void readMonitor(AioSession<T> session, int readSize)
NetMonitorreadMonitor in interface NetMonitor<T>session - 当前执行read的AioSession对象readSize - 已读数据长度public void writeMonitor(AioSession<T> session, int writeSize)
NetMonitorwriteMonitor in interface NetMonitor<T>session - 本次执行write回调的AIOSession对象writeSize - 本次输出的数据长度Copyright © 2019. All rights reserved.