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:
java.lang.AutoCloseable
public class H2TestServer extends AsyncServer
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.hc.core5.testing.nio.IOReactorExecutor
IOReactorExecutor.Status
-
-
Field Summary
Fields Modifier and Type Field Description private RequestHandlerRegistry<Supplier<AsyncServerExchangeHandler>>registryprivate javax.net.ssl.SSLContextsslContextprivate SSLSessionInitializersslSessionInitializerprivate SSLSessionVerifiersslSessionVerifier
-
Constructor Summary
Constructors Constructor Description H2TestServer()H2TestServer(IOReactorConfig ioReactorConfig, javax.net.ssl.SSLContext sslContext, SSLSessionInitializer sslSessionInitializer, SSLSessionVerifier sslSessionVerifier)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidregister(java.lang.String uriPattern, Supplier<AsyncServerExchangeHandler> supplier)<T> voidregister(java.lang.String uriPattern, AsyncServerRequestHandler<T> requestHandler)java.net.InetSocketAddressstart()java.net.InetSocketAddressstart(Http1Config http1Config)java.net.InetSocketAddressstart(HttpProcessor httpProcessor, Decorator<AsyncServerExchangeHandler> exchangeHandlerDecorator, Http1Config http1Config)java.net.InetSocketAddressstart(HttpProcessor httpProcessor, Decorator<AsyncServerExchangeHandler> exchangeHandlerDecorator, H2Config h2Config)java.net.InetSocketAddressstart(H2Config h2Config)voidstart(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 Detail
-
sslContext
private final javax.net.ssl.SSLContext sslContext
-
sslSessionInitializer
private final SSLSessionInitializer sslSessionInitializer
-
sslSessionVerifier
private final SSLSessionVerifier sslSessionVerifier
-
registry
private final RequestHandlerRegistry<Supplier<AsyncServerExchangeHandler>> registry
-
-
Constructor Detail
-
H2TestServer
public H2TestServer(IOReactorConfig ioReactorConfig, javax.net.ssl.SSLContext sslContext, SSLSessionInitializer sslSessionInitializer, SSLSessionVerifier sslSessionVerifier) throws java.io.IOException
- Throws:
java.io.IOException
-
H2TestServer
public H2TestServer() throws java.io.IOException- Throws:
java.io.IOException
-
-
Method Detail
-
register
public void register(java.lang.String uriPattern, Supplier<AsyncServerExchangeHandler> supplier)
-
register
public <T> void register(java.lang.String uriPattern, AsyncServerRequestHandler<T> requestHandler)
-
start
public void start(IOEventHandlerFactory handlerFactory) throws java.io.IOException
- Throws:
java.io.IOException
-
start
public java.net.InetSocketAddress start(HttpProcessor httpProcessor, Decorator<AsyncServerExchangeHandler> exchangeHandlerDecorator, H2Config h2Config) throws java.lang.Exception
- Throws:
java.lang.Exception
-
start
public java.net.InetSocketAddress start(HttpProcessor httpProcessor, Decorator<AsyncServerExchangeHandler> exchangeHandlerDecorator, Http1Config http1Config) throws java.lang.Exception
- Throws:
java.lang.Exception
-
start
public java.net.InetSocketAddress start(H2Config h2Config) throws java.lang.Exception
- Throws:
java.lang.Exception
-
start
public java.net.InetSocketAddress start(Http1Config http1Config) throws java.lang.Exception
- Throws:
java.lang.Exception
-
start
public java.net.InetSocketAddress start() throws java.lang.Exception- Throws:
java.lang.Exception
-
-