java.lang.Object
org.miaixz.bus.socket.Worker
- All Implemented Interfaces:
Runnable
Worker相关实现
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Constructor Summary
ConstructorsConstructorDescriptionWorker(BufferPagePool writeBufferPool, int threadNum) Worker(BufferPage readBufferPage, BufferPagePool writeBufferPool, int threadNum) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddRegister(Consumer<Selector> register) 注册事件booleandoRead(UdpChannel channel) voidvoidrun()voidshutdown()停止服务
-
Constructor Details
-
Worker
- Throws:
IOException
-
Worker
public Worker(BufferPage readBufferPage, BufferPagePool writeBufferPool, int threadNum) throws IOException - Throws:
IOException
-
-
Method Details
-
addRegister
注册事件 -
run
public void run() -
doSelector
- Throws:
IOException
-
doRead
- Throws:
IOException
-
shutdown
public void shutdown()停止服务
-