Package org.apache.hc.core5.testing.nio
Class H2TestServer
java.lang.Object
org.apache.hc.core5.testing.nio.IOReactorExecutor<DefaultListeningIOReactor>
org.apache.hc.core5.testing.nio.AsyncServer
org.apache.hc.core5.testing.nio.H2TestServer
- All Implemented Interfaces:
AutoCloseable
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hc.core5.testing.nio.IOReactorExecutor
IOReactorExecutor.Status
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final RequestHandlerRegistry
<Supplier<AsyncServerExchangeHandler>> private final SSLContext
private final SSLSessionInitializer
private final SSLSessionVerifier
-
Constructor Summary
ConstructorsConstructorDescriptionH2TestServer
(IOReactorConfig ioReactorConfig, SSLContext sslContext, SSLSessionInitializer sslSessionInitializer, SSLSessionVerifier sslSessionVerifier) -
Method Summary
Modifier and TypeMethodDescriptionvoid
register
(String uriPattern, Supplier<AsyncServerExchangeHandler> supplier) <T> void
register
(String uriPattern, AsyncServerRequestHandler<T> requestHandler) start()
start
(Http1Config http1Config) start
(HttpProcessor httpProcessor, Decorator<AsyncServerExchangeHandler> exchangeHandlerDecorator, Http1Config http1Config) start
(HttpProcessor httpProcessor, Decorator<AsyncServerExchangeHandler> exchangeHandlerDecorator, H2Config h2Config) void
start
(IOEventHandlerFactory handlerFactory) Methods inherited from class org.apache.hc.core5.testing.nio.AsyncServer
createIOReactor, getEndpoints, listen
Methods inherited from class org.apache.hc.core5.testing.nio.IOReactorExecutor
awaitShutdown, close, execute, getStatus, initiateShutdown, reactor, shutdown
-
Field Details
-
sslContext
-
sslSessionInitializer
-
sslSessionVerifier
-
registry
-
-
Constructor Details
-
H2TestServer
public H2TestServer(IOReactorConfig ioReactorConfig, SSLContext sslContext, SSLSessionInitializer sslSessionInitializer, SSLSessionVerifier sslSessionVerifier) throws IOException - Throws:
IOException
-
H2TestServer
- Throws:
IOException
-
-
Method Details
-
register
-
register
-
start
- Throws:
IOException
-
start
public InetSocketAddress start(HttpProcessor httpProcessor, Decorator<AsyncServerExchangeHandler> exchangeHandlerDecorator, H2Config h2Config) throws Exception - Throws:
Exception
-
start
public InetSocketAddress start(HttpProcessor httpProcessor, Decorator<AsyncServerExchangeHandler> exchangeHandlerDecorator, Http1Config http1Config) throws Exception - Throws:
Exception
-
start
- Throws:
Exception
-
start
- Throws:
Exception
-
start
- Throws:
Exception
-