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