Package org.miaixz.bus.socket.handler
Class ReadCompletionHandler
java.lang.Object
org.miaixz.bus.socket.handler.ReadCompletionHandler
- All Implemented Interfaces:
CompletionHandler<Integer,TcpAioSession>
- Direct Known Subclasses:
ConcurrentReadCompletionHandler
public class ReadCompletionHandler
extends Object
implements CompletionHandler<Integer,TcpAioSession>
读写事件回调处理类
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcompleted(Integer result, TcpAioSession aioSession) 处理消息读回调事件final voidfailed(Throwable exc, TcpAioSession aioSession)
-
Constructor Details
-
ReadCompletionHandler
public ReadCompletionHandler()
-
-
Method Details
-
completed
处理消息读回调事件- Specified by:
completedin interfaceCompletionHandler<Integer,TcpAioSession> - Parameters:
result- 已读消息字节数aioSession- 当前触发读回调的会话
-
failed
- Specified by:
failedin interfaceCompletionHandler<Integer,TcpAioSession>
-