Class H2TestServer
java.lang.Object
org.apache.hc.core5.testing.nio.AsyncServer
org.apache.hc.core5.testing.nio.HttpTestServer
org.apache.hc.core5.testing.nio.H2TestServer
- All Implemented Interfaces:
AutoCloseable
-
Constructor Summary
ConstructorsConstructorDescriptionH2TestServer(org.apache.hc.core5.reactor.IOReactorConfig ioReactorConfig, SSLContext sslContext, org.apache.hc.core5.reactor.ssl.SSLSessionInitializer sslSessionInitializer, org.apache.hc.core5.reactor.ssl.SSLSessionVerifier sslSessionVerifier) -
Method Summary
Modifier and TypeMethodDescriptionvoidawaitShutdown(org.apache.hc.core5.util.TimeValue waitTime) voidclose()voidconfigure(org.apache.hc.core5.function.Decorator<org.apache.hc.core5.http.nio.AsyncServerExchangeHandler> exchangeHandlerDecorator) voidconfigure(org.apache.hc.core5.http.config.Http1Config http1Config) voidconfigure(org.apache.hc.core5.http.protocol.HttpProcessor httpProcessor) voidconfigure(org.apache.hc.core5.http2.config.H2Config h2Config) protected voidexecute(org.apache.hc.core5.reactor.IOEventHandlerFactory ioEventHandlerFactory) org.apache.hc.core5.reactor.IOReactorStatusvoidvoidshutdown(org.apache.hc.core5.util.TimeValue graceTime) start()start(org.apache.hc.core5.http.config.Http1Config http1Config) Deprecated.start(org.apache.hc.core5.http.protocol.HttpProcessor httpProcessor, org.apache.hc.core5.function.Decorator<org.apache.hc.core5.http.nio.AsyncServerExchangeHandler> exchangeHandlerDecorator, org.apache.hc.core5.http.config.Http1Config http1Config) Deprecated.start(org.apache.hc.core5.http.protocol.HttpProcessor httpProcessor, org.apache.hc.core5.function.Decorator<org.apache.hc.core5.http.nio.AsyncServerExchangeHandler> exchangeHandlerDecorator, org.apache.hc.core5.http2.config.H2Config h2Config) Deprecated.start(org.apache.hc.core5.http.protocol.HttpProcessor httpProcessor, org.apache.hc.core5.http.config.Http1Config http1Config) Deprecated.start(org.apache.hc.core5.http2.config.H2Config h2Config) Deprecated.Useconfigure(H2Config),start().voidstart(org.apache.hc.core5.reactor.IOEventHandlerFactory handlerFactory) Deprecated.Methods inherited from class HttpTestServer
register, register, startExecutionMethods inherited from class AsyncServer
getEndpoints, listen
-
Constructor Details
-
H2TestServer
public H2TestServer(org.apache.hc.core5.reactor.IOReactorConfig ioReactorConfig, SSLContext sslContext, org.apache.hc.core5.reactor.ssl.SSLSessionInitializer sslSessionInitializer, org.apache.hc.core5.reactor.ssl.SSLSessionVerifier sslSessionVerifier) throws IOException - Throws:
IOException
-
H2TestServer
- Throws:
IOException
-
-
Method Details
-
configure
public void configure(org.apache.hc.core5.http2.config.H2Config h2Config) - Since:
- 5.3
-
configure
public void configure(org.apache.hc.core5.http.config.Http1Config http1Config) - Since:
- 5.3
-
configure
public void configure(org.apache.hc.core5.http.protocol.HttpProcessor httpProcessor) - Overrides:
configurein classHttpTestServer- Since:
- 5.3
-
configure
public void configure(org.apache.hc.core5.function.Decorator<org.apache.hc.core5.http.nio.AsyncServerExchangeHandler> exchangeHandlerDecorator) - Overrides:
configurein classHttpTestServer- Since:
- 5.3
-
start
@Deprecated public void start(org.apache.hc.core5.reactor.IOEventHandlerFactory handlerFactory) throws IOException Deprecated.- Throws:
IOException
-
start
@Deprecated public InetSocketAddress start(org.apache.hc.core5.http.protocol.HttpProcessor httpProcessor, org.apache.hc.core5.function.Decorator<org.apache.hc.core5.http.nio.AsyncServerExchangeHandler> exchangeHandlerDecorator, org.apache.hc.core5.http.config.Http1Config http1Config) throws Exception Deprecated.- Throws:
Exception
-
start
@Deprecated public InetSocketAddress start(org.apache.hc.core5.http.protocol.HttpProcessor httpProcessor, org.apache.hc.core5.function.Decorator<org.apache.hc.core5.http.nio.AsyncServerExchangeHandler> exchangeHandlerDecorator, org.apache.hc.core5.http2.config.H2Config h2Config) throws Exception Deprecated.- Throws:
Exception
-
start
@Deprecated public InetSocketAddress start(org.apache.hc.core5.http.protocol.HttpProcessor httpProcessor, org.apache.hc.core5.http.config.Http1Config http1Config) throws Exception Deprecated.- Throws:
Exception
-
start
@Deprecated public InetSocketAddress start(org.apache.hc.core5.http2.config.H2Config h2Config) throws Exception Deprecated.Useconfigure(H2Config),start().- Throws:
Exception
-
start
@Deprecated public InetSocketAddress start(org.apache.hc.core5.http.config.Http1Config http1Config) throws Exception Deprecated.- Throws:
Exception
-
start
- Specified by:
startin classHttpTestServer- Throws:
Exception
-
execute
protected void execute(org.apache.hc.core5.reactor.IOEventHandlerFactory ioEventHandlerFactory) throws IOException - Throws:
IOException
-
getStatus
public org.apache.hc.core5.reactor.IOReactorStatus getStatus() -
awaitShutdown
- Throws:
InterruptedException
-
initiateShutdown
public void initiateShutdown() -
shutdown
public void shutdown(org.apache.hc.core5.util.TimeValue graceTime) -
close
- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-
configure(Http1Config),start().