Package org.apache.hc.core5.testing.nio
Class IOReactorExecutor<T extends IOReactorService>
java.lang.Object
org.apache.hc.core5.testing.nio.IOReactorExecutor<T>
- All Implemented Interfaces:
AutoCloseable
- Direct Known Subclasses:
AsyncRequester,AsyncServer
abstract class IOReactorExecutor<T extends IOReactorService>
extends Object
implements AutoCloseable
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final IOReactorConfigprivate final AtomicReference<T> private final AtomicReference<IOReactorExecutor.Status> private final ThreadFactory -
Constructor Summary
ConstructorsConstructorDescriptionIOReactorExecutor(IOReactorConfig ioReactorConfig, ThreadFactory workerThreadFactory) -
Method Summary
Modifier and TypeMethodDescriptionvoidawaitShutdown(TimeValue waitTime) voidclose()(package private) abstract TcreateIOReactor(IOEventHandlerFactory ioEventHandlerFactory, IOReactorConfig ioReactorConfig, ThreadFactory threadFactory, Callback<IOSession> sessionShutdownCallback) private Tprotected voidexecute(IOEventHandlerFactory ioEventHandlerFactory) void(package private) Treactor()void
-
Field Details
-
ioReactorConfig
-
workerThreadFactory
-
ioReactorRef
-
status
-
-
Constructor Details
-
IOReactorExecutor
IOReactorExecutor(IOReactorConfig ioReactorConfig, ThreadFactory workerThreadFactory)
-
-
Method Details
-
createIOReactor
abstract T createIOReactor(IOEventHandlerFactory ioEventHandlerFactory, IOReactorConfig ioReactorConfig, ThreadFactory threadFactory, Callback<IOSession> sessionShutdownCallback) throws IOException - Throws:
IOException
-
execute
- Throws:
IOException
-
ensureRunning
-
reactor
T reactor() -
getStatus
-
awaitShutdown
- Throws:
InterruptedException
-
initiateShutdown
public void initiateShutdown() -
shutdown
-
close
- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-