Package org.aoju.bus.socket.plugins
Interface Plugin<T>
- All Superinterfaces:
NetMonitor
- All Known Implementing Classes:
AbstractPlugin,BlackListPlugin,BufferPageMonitorPlugin,HeartPlugin,MonitorPlugin,RateLimiterPlugin,ReconnectPlugin,SocketOptionPlugin,SslPlugin,StreamMonitorPlugin
插件接口
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Method Summary
Modifier and TypeMethodDescriptionbooleanpreProcess(AioSession session, T t) 对请求消息进行预处理,并决策是否进行后续的MessageProcessor处理 若返回false,则当前消息将被忽略 若返回true,该消息会正常秩序MessageProcessor.process.voidstateEvent(SocketStatus socketStatus, AioSession session, Throwable throwable) 监听状态机事件Methods inherited from interface org.aoju.bus.socket.NetMonitor
afterRead, afterWrite, beforeRead, beforeWrite, shouldAccept
-
Method Details
-
preProcess
对请求消息进行预处理,并决策是否进行后续的MessageProcessor处理 若返回false,则当前消息将被忽略 若返回true,该消息会正常秩序MessageProcessor.process.- Parameters:
session- 会话t- 对象- Returns:
- the true/false
-
stateEvent
监听状态机事件- Parameters:
socketStatus- 状态session- 会话throwable- 线程- See Also:
-