org.apache.hc.core5.testing.nio

## Class AsyncServer

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

- All Implemented Interfaces:
    AutoCloseable
  Direct Known Subclasses:
    H2TestServer, Http1TestServer

      public class AsyncServer
      extends Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AsyncServer(IOReactorConfig ioReactorConfig)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `awaitShutdown(TimeValue waitTime)`
    `void` | `close()`
    `protected void` | `execute(IOEventHandlerFactory ioEventHandlerFactory)`
    `Set<ListenerEndpoint>` | `getEndpoints()`
    `IOReactorStatus` | `getStatus()`
    `void` | `initiateShutdown()`
    `Future<ListenerEndpoint>` | `listen(InetSocketAddress address)`
    `void` | `shutdown(TimeValue graceTime)`

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

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

- - ### Constructor Detail

    - #### AsyncServer

          public AsyncServer(IOReactorConfig ioReactorConfig)

  - ### Method Detail

    - #### listen

          public Future<ListenerEndpoint> listen(InetSocketAddress address)

    - #### getEndpoints

          public Set<ListenerEndpoint> getEndpoints()

    - #### 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–2022 The Apache Software Foundation. All rights reserved.