Package org.apache.hc.core5.testing.nio
Class Http1TestServer
- java.lang.Object
-
- org.apache.hc.core5.testing.nio.IOReactorExecutor<DefaultListeningIOReactor>
-
- org.apache.hc.core5.testing.nio.AsyncServer
-
- org.apache.hc.core5.testing.nio.Http1TestServer
-
- All Implemented Interfaces:
java.lang.AutoCloseable
public class Http1TestServer 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 Http1TestServer()Http1TestServer(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(HttpProcessor httpProcessor, Decorator<AsyncServerExchangeHandler> exchangeHandlerDecorator, Http1Config http1Config)java.net.InetSocketAddressstart(HttpProcessor httpProcessor, Http1Config http1Config)java.net.InetSocketAddressstart(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
-
registry
private final RequestHandlerRegistry<Supplier<AsyncServerExchangeHandler>> registry
-
sslContext
private final javax.net.ssl.SSLContext sslContext
-
sslSessionInitializer
private final SSLSessionInitializer sslSessionInitializer
-
sslSessionVerifier
private final SSLSessionVerifier sslSessionVerifier
-
-
Constructor Detail
-
Http1TestServer
public Http1TestServer(IOReactorConfig ioReactorConfig, javax.net.ssl.SSLContext sslContext, SSLSessionInitializer sslSessionInitializer, SSLSessionVerifier sslSessionVerifier) throws java.io.IOException
- Throws:
java.io.IOException
-
Http1TestServer
public Http1TestServer() 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 java.net.InetSocketAddress start(IOEventHandlerFactory handlerFactory) 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(HttpProcessor httpProcessor, Http1Config http1Config) throws java.lang.Exception
- Throws:
java.lang.Exception
-
start
public java.net.InetSocketAddress start() throws java.lang.Exception- Throws:
java.lang.Exception
-
-