org.apache.hc.core5.testing.nio

## Class Http1TestServer

- java.lang.Object
- - org.apache.hc.core5.testing.nio.AsyncServer
  - - org.apache.hc.core5.testing.nio.Http1TestServer

- All Implemented Interfaces:
    AutoCloseable

      public class Http1TestServer
      extends AsyncServer

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Http1TestServer()`
    `Http1TestServer(IOReactorConfig ioReactorConfig, SSLContext sslContext, SSLSessionInitializer sslSessionInitializer, SSLSessionVerifier sslSessionVerifier)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `awaitShutdown(TimeValue waitTime)`
    `void` | `close()`
    `protected void` | `execute(IOEventHandlerFactory ioEventHandlerFactory)`
    `IOReactorStatus` | `getStatus()`
    `void` | `initiateShutdown()`
    `<T> void` | `register(String uriPattern, AsyncServerRequestHandler<T> requestHandler)`
    `void` | `register(String uriPattern, Supplier<AsyncServerExchangeHandler> supplier)`
    `void` | `shutdown(TimeValue graceTime)`
    `InetSocketAddress` | `start()`
    `InetSocketAddress` | `start(HttpProcessor httpProcessor, Decorator<AsyncServerExchangeHandler> exchangeHandlerDecorator, Http1Config http1Config)`
    `InetSocketAddress` | `start(HttpProcessor httpProcessor, Http1Config http1Config)`
    `InetSocketAddress` | `start(IOEventHandlerFactory handlerFactory)`

    - ### Methods inherited from class org.apache.hc.core5.testing.nio.AsyncServer

      `getEndpoints, listen`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Http1TestServer

          public Http1TestServer(IOReactorConfig ioReactorConfig,
                         SSLContext sslContext,
                         SSLSessionInitializer sslSessionInitializer,
                         SSLSessionVerifier sslSessionVerifier)
                          throws IOException

      Throws:
        `IOException`

    - #### Http1TestServer

          public Http1TestServer()
                          throws IOException

      Throws:
        `IOException`

  - ### Method Detail

    - #### register

          public void register(String uriPattern,
                      Supplier<AsyncServerExchangeHandler> supplier)

    - #### register

          public <T> void register(String uriPattern,
                          AsyncServerRequestHandler<T> requestHandler)

    - #### start

          public InetSocketAddress start(IOEventHandlerFactory handlerFactory)
                                  throws Exception

      Throws:
        `Exception`

    - #### start

          public InetSocketAddress start(HttpProcessor httpProcessor,
                                Decorator<AsyncServerExchangeHandler> exchangeHandlerDecorator,
                                Http1Config http1Config)
                                  throws Exception

      Throws:
        `Exception`

    - #### start

          public InetSocketAddress start(HttpProcessor httpProcessor,
                                Http1Config http1Config)
                                  throws Exception

      Throws:
        `Exception`

    - #### start

          public InetSocketAddress start()
                                  throws Exception

      Throws:
        `Exception`

    - #### execute

          protected void execute(IOEventHandlerFactory ioEventHandlerFactory)
                          throws IOException

      Throws:
        `IOException`

    - #### getStatus

          public IOReactorStatus getStatus()

    - #### awaitShutdown

          public void awaitShutdown(TimeValue waitTime)
                             throws InterruptedException

      Throws:
        `InterruptedException`

    - #### initiateShutdown

          public void initiateShutdown()

    - #### shutdown

          public void shutdown(TimeValue graceTime)

    - #### close

          public void close()
                     throws Exception

      Specified by:
        `close` in interface `AutoCloseable`
      Throws:
        `Exception`

Copyright © 2005–2020 The Apache Software Foundation. All rights reserved.