org.apache.hc.core5.http.impl.bootstrap

## Class AsyncServerBootstrap

- java.lang.Object
- - org.apache.hc.core5.http.impl.bootstrap.AsyncServerBootstrap

-     public class AsyncServerBootstrap
      extends Object

  `HttpAsyncServer` bootstrap.
  Since:
    5.0

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `AsyncServerBootstrap` | `addFilterAfter(String existing, String name, AsyncFilterHandler filterHandler)` Adds the filter after the filter with the given name.
    `AsyncServerBootstrap` | `addFilterBefore(String existing, String name, AsyncFilterHandler filterHandler)` Adds the filter before the filter with the given name.
    `AsyncServerBootstrap` | `addFilterFirst(String name, AsyncFilterHandler filterHandler)` Adds an filter to the head of the processing list.
    `AsyncServerBootstrap` | `addFilterLast(String name, AsyncFilterHandler filterHandler)` Adds an filter to the tail of the processing list.
    `static AsyncServerBootstrap` | `bootstrap()` Creates a new AsyncServerBootstrap instance.
    `HttpAsyncServer` | `create()`
    `<T> AsyncServerBootstrap` | `register(String uriPattern, AsyncServerRequestHandler<T> requestHandler)` Registers the given `AsyncServerRequestHandler` as a default handler for URIs matching the given pattern.
    `<T> AsyncServerBootstrap` | `register(String hostname, String uriPattern, AsyncServerRequestHandler<T> requestHandler)` Registers the given `AsyncServerRequestHandler` as a handler for URIs matching the given host and pattern.
    `AsyncServerBootstrap` | `register(String hostname, String uriPattern, Supplier<AsyncServerExchangeHandler> supplier)` Registers the given `AsyncServerExchangeHandler` `Supplier` as a handler for URIs matching the given host and pattern.
    `AsyncServerBootstrap` | `register(String uriPattern, Supplier<AsyncServerExchangeHandler> supplier)` Registers the given `AsyncServerExchangeHandler` `Supplier` as a default handler for URIs matching the given pattern.
    `<T> AsyncServerBootstrap` | `registerVirtual(String hostname, String uriPattern, AsyncServerRequestHandler<T> requestHandler)` Deprecated. Use `register(String, String, AsyncServerRequestHandler)`.
    `AsyncServerBootstrap` | `registerVirtual(String hostname, String uriPattern, Supplier<AsyncServerExchangeHandler> supplier)` Deprecated. use `register(String, String, Supplier)`.
    `AsyncServerBootstrap` | `replaceFilter(String existing, AsyncFilterHandler filterHandler)` Replaces an existing filter with the given name with new filter.
    `AsyncServerBootstrap` | `setCanonicalHostName(String canonicalHostName)` Sets canonical name (fully qualified domain name) of the server.
    `AsyncServerBootstrap` | `setCharCodingConfig(CharCodingConfig charCodingConfig)` Sets char coding configuration.
    `AsyncServerBootstrap` | `setConnectionReuseStrategy(ConnectionReuseStrategy connStrategy)` Sets `ConnectionReuseStrategy` instance.
    `AsyncServerBootstrap` | `setExceptionCallback(Callback<Exception> exceptionCallback)` Sets `Exception` `Callback` instance.
    `AsyncServerBootstrap` | `setHttp1Config(Http1Config http1Config)` Sets HTTP/1.1 protocol parameters.
    `AsyncServerBootstrap` | `setHttpProcessor(HttpProcessor httpProcessor)` Sets `HttpProcessor` instance.
    `AsyncServerBootstrap` | `setIOReactorConfig(IOReactorConfig ioReactorConfig)` Sets I/O reactor configuration.
    `AsyncServerBootstrap` | `setIOSessionDecorator(Decorator<IOSession> ioSessionDecorator)` Sets `IOSession` `Decorator` instance.
    `AsyncServerBootstrap` | `setIOSessionListener(IOSessionListener sessionListener)` Sets `IOSessionListener` instance.
    `AsyncServerBootstrap` | `setLookupRegistry(LookupRegistry<Supplier<AsyncServerExchangeHandler>> lookupRegistry)` Deprecated. Use `RequestRouter`.
    `AsyncServerBootstrap` | `setRequestRouter(HttpRequestMapper<Supplier<AsyncServerExchangeHandler>> requestRouter)` Sets `HttpRequestMapper` instance.
    `AsyncServerBootstrap` | `setStreamListener(Http1StreamListener streamListener)` Sets `Http1StreamListener` instance.
    `AsyncServerBootstrap` | `setTlsHandshakeTimeout(Timeout handshakeTimeout)` Sets TLS handshake `Timeout`.
    `AsyncServerBootstrap` | `setTlsStrategy(TlsStrategy tlsStrategy)` Sets `TlsStrategy` instance.

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

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

- - ### Method Detail

    - #### bootstrap

          public static AsyncServerBootstrap bootstrap()

      Creates a new AsyncServerBootstrap instance.
      Returns:
        a new AsyncServerBootstrap instance.

    - #### setCanonicalHostName

          public final AsyncServerBootstrap setCanonicalHostName(String canonicalHostName)

      Sets canonical name (fully qualified domain name) of the server.
      Parameters:
        `canonicalHostName` - canonical name (fully qualified domain name) of the server.
      Returns:
        this instance.

    - #### setIOReactorConfig

          public final AsyncServerBootstrap setIOReactorConfig(IOReactorConfig ioReactorConfig)

      Sets I/O reactor configuration.
      Parameters:
        `ioReactorConfig` - I/O reactor configuration.
      Returns:
        this instance.

    - #### setHttp1Config

          public final AsyncServerBootstrap setHttp1Config(Http1Config http1Config)

      Sets HTTP/1.1 protocol parameters.
      Parameters:
        `http1Config` - HTTP/1.1 protocol parameters.
      Returns:
        this instance.

    - #### setCharCodingConfig

          public final AsyncServerBootstrap setCharCodingConfig(CharCodingConfig charCodingConfig)

      Sets char coding configuration.
      Parameters:
        `charCodingConfig` - char coding configuration.
      Returns:
        this instance.

    - #### setHttpProcessor

          public final AsyncServerBootstrap setHttpProcessor(HttpProcessor httpProcessor)

      Sets `HttpProcessor` instance.
      Parameters:
        `httpProcessor` - `HttpProcessor` instance.
      Returns:
        this instance.

    - #### setConnectionReuseStrategy

          public final AsyncServerBootstrap setConnectionReuseStrategy(ConnectionReuseStrategy connStrategy)

      Sets `ConnectionReuseStrategy` instance.
      Parameters:
        `connStrategy` - `ConnectionReuseStrategy` instance.
      Returns:
        this instance.

    - #### setTlsStrategy

          public final AsyncServerBootstrap setTlsStrategy(TlsStrategy tlsStrategy)

      Sets `TlsStrategy` instance.
      Parameters:
        `tlsStrategy` - `TlsStrategy` instance.
      Returns:
        this instance.

    - #### setTlsHandshakeTimeout

          public final AsyncServerBootstrap setTlsHandshakeTimeout(Timeout handshakeTimeout)

      Sets TLS handshake `Timeout`.
      Parameters:
        `handshakeTimeout` - TLS handshake `Timeout`.
      Returns:
        this instance.

    - #### setIOSessionDecorator

          public final AsyncServerBootstrap setIOSessionDecorator(Decorator<IOSession> ioSessionDecorator)

      Sets `IOSession` `Decorator` instance.
      Parameters:
        `ioSessionDecorator` - `IOSession` `Decorator` instance.
      Returns:
        this instance.

    - #### setExceptionCallback

          public final AsyncServerBootstrap setExceptionCallback(Callback<Exception> exceptionCallback)

      Sets `Exception` `Callback` instance.
      Parameters:
        `exceptionCallback` - `Exception` `Callback` instance.
      Returns:
        this instance.

    - #### setIOSessionListener

          public final AsyncServerBootstrap setIOSessionListener(IOSessionListener sessionListener)

      Sets `IOSessionListener` instance.
      Parameters:
        `sessionListener` - `IOSessionListener` instance.
      Returns:
        this instance.

    - #### setLookupRegistry

          @Deprecated
          public final AsyncServerBootstrap setLookupRegistry(LookupRegistry<Supplier<AsyncServerExchangeHandler>> lookupRegistry)

      Deprecated. Use `RequestRouter`.
      Sets a LookupRegistry for Suppliers of AsyncServerExchangeHandler.
      Parameters:
        `lookupRegistry` - LookupRegistry for Suppliers of AsyncServerExchangeHandler.
      Returns:
        this instance.

    - #### setRequestRouter

          public final AsyncServerBootstrap setRequestRouter(HttpRequestMapper<Supplier<AsyncServerExchangeHandler>> requestRouter)

      Sets `HttpRequestMapper` instance.
      Parameters:
        `requestRouter` - `HttpRequestMapper` instance.
      Returns:
        this instance.
      Since:
        5.3
      See Also:
        `RequestRouter`

    - #### setStreamListener

          public final AsyncServerBootstrap setStreamListener(Http1StreamListener streamListener)

      Sets `Http1StreamListener` instance.
      Parameters:
        `streamListener` - `Http1StreamListener` instance.
      Returns:
        this instance.
      Since:
        5.0

    - #### register

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

      Registers the given `AsyncServerExchangeHandler` `Supplier` as a default handler for URIs matching the given pattern.
      Parameters:
        `uriPattern` - the non-null pattern to register the handler for.
        `supplier` - the non-null handler supplier.
      Returns:
        this instance.

    - #### register

          public final AsyncServerBootstrap register(String hostname,
                                                     String uriPattern,
                                                     Supplier<AsyncServerExchangeHandler> supplier)

      Registers the given `AsyncServerExchangeHandler` `Supplier` as a handler for URIs matching the given host and pattern.
      Parameters:
        `hostname` - the non-null host name.
        `uriPattern` - the non-null pattern to register the handler for.
        `supplier` - the non-null handler supplier.
      Returns:
        this instance.
      Since:
        5.3

    - #### registerVirtual

          @Deprecated
          public final AsyncServerBootstrap registerVirtual(String hostname,
                                                                        String uriPattern,
                                                                        Supplier<AsyncServerExchangeHandler> supplier)

      Deprecated. use `register(String, String, Supplier)`.
      Registers the given `AsyncServerExchangeHandler` `Supplier` as a handler for URIs matching the given host and pattern.
      Parameters:
        `hostname` - the host name.
        `uriPattern` - the pattern to register the handler for.
        `supplier` - the handler supplier.
      Returns:
        this instance.

    - #### register

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

      Registers the given `AsyncServerRequestHandler` as a default handler for URIs matching the given pattern.
      Type Parameters:
        `T` - the AsyncServerRequestHandler request representation type.
      Parameters:
        `uriPattern` - the pattern to register the handler for.
        `requestHandler` - the handler.
      Returns:
        this instance.

    - #### register

          public final <T> AsyncServerBootstrap register(String hostname,
                                                         String uriPattern,
                                                         AsyncServerRequestHandler<T> requestHandler)

      Registers the given `AsyncServerRequestHandler` as a handler for URIs matching the given host and pattern.
      Type Parameters:
        `T` - the request type.
      Parameters:
        `hostname` - the host name
        `uriPattern` - the pattern to register the handler for.
        `requestHandler` - the handler.
      Returns:
        this instance.
      Since:
        5.3

    - #### registerVirtual

          @Deprecated
          public final <T> AsyncServerBootstrap registerVirtual(String hostname,
                                                                            String uriPattern,
                                                                            AsyncServerRequestHandler<T> requestHandler)

      Deprecated. Use `register(String, String, AsyncServerRequestHandler)`.
      Type Parameters:
        `T` - the request type.
      Returns:
        this instance.

    - #### addFilterBefore

          public final AsyncServerBootstrap addFilterBefore(String existing,
                                                            String name,
                                                            AsyncFilterHandler filterHandler)

      Adds the filter before the filter with the given name.
      Returns:
        this instance.

    - #### addFilterAfter

          public final AsyncServerBootstrap addFilterAfter(String existing,
                                                           String name,
                                                           AsyncFilterHandler filterHandler)

      Adds the filter after the filter with the given name.
      Returns:
        this instance.

    - #### replaceFilter

          public final AsyncServerBootstrap replaceFilter(String existing,
                                                          AsyncFilterHandler filterHandler)

      Replaces an existing filter with the given name with new filter.
      Returns:
        this instance.

    - #### addFilterFirst

          public final AsyncServerBootstrap addFilterFirst(String name,
                                                           AsyncFilterHandler filterHandler)

      Adds an filter to the head of the processing list.
      Returns:
        this instance.

    - #### addFilterLast

          public final AsyncServerBootstrap addFilterLast(String name,
                                                          AsyncFilterHandler filterHandler)

      Adds an filter to the tail of the processing list.
      Returns:
        this instance.

    - #### create

          public HttpAsyncServer create()

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