Package org.aoju.bus.socket.process
Interface MessageProcessor<T>
- Type Parameters:
T- 消息对象实体类型
- All Known Implementing Classes:
AbstractMessageProcessor,GroupMessageProcessor
public interface MessageProcessor<T>
消息处理器。
通过实现该接口,对完成解码的消息进行业务处理。
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Method Summary
Modifier and TypeMethodDescriptionvoidprocess(AioSession session, T msg) 处理接收到的消息default voidstateEvent(AioSession session, SocketStatus socketStatus, Throwable throwable) 状态机事件,当枚举事件发生时由框架触发该方法
-
Method Details
-
process
处理接收到的消息- Parameters:
session- 通信会话msg- 待处理的业务消息
-
stateEvent
状态机事件,当枚举事件发生时由框架触发该方法- Parameters:
session- 本次触发状态机的AioSession对象socketStatus- 状态枚举throwable- 异常对象,如果存在的话- See Also:
-