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)` Add an filter to the head of the processing list.
    `AsyncServerBootstrap` | `addFilterLast(String name, AsyncFilterHandler filterHandler)` Add an filter to the tail of the processing list.
    `static AsyncServerBootstrap` | `bootstrap()`
    `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 the 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 the 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)` Replace 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 connection configuration.
    `AsyncServerBootstrap` | `setConnectionReuseStrategy(ConnectionReuseStrategy connStrategy)` Assigns `ConnectionReuseStrategy` instance.
    `AsyncServerBootstrap` | `setExceptionCallback(Callback<Exception> exceptionCallback)` Assigns `Exception` `Callback` instance.
    `AsyncServerBootstrap` | `setHttp1Config(Http1Config http1Config)` Sets HTTP/1.1 protocol parameters.
    `AsyncServerBootstrap` | `setHttpProcessor(HttpProcessor httpProcessor)` Assigns `HttpProcessor` instance.
    `AsyncServerBootstrap` | `setIOReactorConfig(IOReactorConfig ioReactorConfig)` Sets I/O reactor configuration.
    `AsyncServerBootstrap` | `setIOSessionDecorator(Decorator<IOSession> ioSessionDecorator)` Assigns `IOSession` `Decorator` instance.
    `AsyncServerBootstrap` | `setIOSessionListener(IOSessionListener sessionListener)` Assigns `IOSessionListener` instance.
    `AsyncServerBootstrap` | `setLookupRegistry(LookupRegistry<Supplier<AsyncServerExchangeHandler>> lookupRegistry)` Deprecated. Use `RequestRouter`.
    `AsyncServerBootstrap` | `setRequestRouter(HttpRequestMapper<Supplier<AsyncServerExchangeHandler>> requestRouter)` Assigns `HttpRequestMapper` instance.
    `AsyncServerBootstrap` | `setStreamListener(Http1StreamListener streamListener)` Assigns `Http1StreamListener` instance.
    `AsyncServerBootstrap` | `setTlsHandshakeTimeout(Timeout handshakeTimeout)` Assigns TLS handshake `Timeout`.
    `AsyncServerBootstrap` | `setTlsStrategy(TlsStrategy tlsStrategy)` Assigns `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()

    - #### setCanonicalHostName

          public final AsyncServerBootstrap setCanonicalHostName(String canonicalHostName)

      Sets canonical name (fully qualified domain name) of the server.

    - #### setIOReactorConfig

          public final AsyncServerBootstrap setIOReactorConfig(IOReactorConfig ioReactorConfig)

      Sets I/O reactor configuration.

    - #### setHttp1Config

          public final AsyncServerBootstrap setHttp1Config(Http1Config http1Config)

      Sets HTTP/1.1 protocol parameters.

    - #### setCharCodingConfig

          public final AsyncServerBootstrap setCharCodingConfig(CharCodingConfig charCodingConfig)

      Sets connection configuration.

    - #### setHttpProcessor

          public final AsyncServerBootstrap setHttpProcessor(HttpProcessor httpProcessor)

      Assigns `HttpProcessor` instance.

    - #### setConnectionReuseStrategy

          public final AsyncServerBootstrap setConnectionReuseStrategy(ConnectionReuseStrategy connStrategy)

      Assigns `ConnectionReuseStrategy` instance.

    - #### setTlsStrategy

          public final AsyncServerBootstrap setTlsStrategy(TlsStrategy tlsStrategy)

      Assigns `TlsStrategy` instance.

    - #### setTlsHandshakeTimeout

          public final AsyncServerBootstrap setTlsHandshakeTimeout(Timeout handshakeTimeout)

      Assigns TLS handshake `Timeout`.

    - #### setIOSessionDecorator

          public final AsyncServerBootstrap setIOSessionDecorator(Decorator<IOSession> ioSessionDecorator)

      Assigns `IOSession` `Decorator` instance.

    - #### setExceptionCallback

          public final AsyncServerBootstrap setExceptionCallback(Callback<Exception> exceptionCallback)

      Assigns `Exception` `Callback` instance.

    - #### setIOSessionListener

          public final AsyncServerBootstrap setIOSessionListener(IOSessionListener sessionListener)

      Assigns `IOSessionListener` instance.

    - #### setLookupRegistry

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

      Deprecated. Use `RequestRouter`.

    - #### setRequestRouter

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

      Assigns `HttpRequestMapper` instance.
      Since:
        5.3
      See Also:
        `RequestRouter`

    - #### setStreamListener

          public final AsyncServerBootstrap setStreamListener(Http1StreamListener streamListener)

      Assigns `Http1StreamListener` 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 pattern to register the handler for.
        `supplier` - the handler supplier.

    - #### 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 the pattern.
      Parameters:
        `hostname` - the host name
        `uriPattern` - the pattern to register the handler for.
        `supplier` - the handler supplier.
      Since:
        5.3

    - #### registerVirtual

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

      Deprecated. use `register(String, String, Supplier)`.

    - #### 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.
      Parameters:
        `uriPattern` - the pattern to register the handler for.
        `requestHandler` - the handler.

    - #### 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 the pattern.
      Parameters:
        `hostname` - the host name
        `uriPattern` - the pattern to register the handler for.
        `requestHandler` - the handler.
      Since:
        5.3

    - #### registerVirtual

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

      Deprecated. Use `register(String, String, AsyncServerRequestHandler)`.

    - #### addFilterBefore

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

      Adds the filter before the filter with the given name.

    - #### addFilterAfter

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

      Adds the filter after the filter with the given name.

    - #### replaceFilter

          public final AsyncServerBootstrap replaceFilter(String existing,
                                                          AsyncFilterHandler filterHandler)

      Replace an existing filter with the given name with new filter.

    - #### addFilterFirst

          public final AsyncServerBootstrap addFilterFirst(String name,
                                                           AsyncFilterHandler filterHandler)

      Add an filter to the head of the processing list.

    - #### addFilterLast

          public final AsyncServerBootstrap addFilterLast(String name,
                                                          AsyncFilterHandler filterHandler)

      Add an filter to the tail of the processing list.

    - #### create

          public HttpAsyncServer create()

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