Top Description Fields Constructors Methods
org.apache.hc.core5.http.impl.bootstrap

public Class AsyncServerBootstrap

extends Object
Class Inheritance
Imports
java.util.ArrayList, .List, org.apache.hc.core5.function.Callback, .Decorator, .Supplier, org.apache.hc.core5.http.ConnectionReuseStrategy, org.apache.hc.core5.http.config.CharCodingConfig, .Http1Config, .NamedElementChain, org.apache.hc.core5.http.impl.DefaultConnectionReuseStrategy, .DefaultContentLengthStrategy, .Http1StreamListener, .HttpProcessors, org.apache.hc.core5.http.impl.nio.DefaultHttpRequestParserFactory, .DefaultHttpResponseWriterFactory, .ServerHttp1IOEventHandlerFactory, .ServerHttp1StreamDuplexerFactory, org.apache.hc.core5.http.nio.AsyncFilterHandler, .AsyncServerExchangeHandler, .AsyncServerRequestHandler, .HandlerFactory, org.apache.hc.core5.http.nio.ssl.TlsStrategy, org.apache.hc.core5.http.nio.support.AsyncServerExpectationFilter, .AsyncServerFilterChainElement, .AsyncServerFilterChainExchangeHandlerFactory, .BasicAsyncServerExpectationDecorator, .BasicServerExchangeHandler, .DefaultAsyncResponseExchangeHandlerFactory, .TerminalAsyncServerFilter, org.apache.hc.core5.http.protocol.HttpProcessor, .LookupRegistry, .RequestHandlerRegistry, .UriPatternType, org.apache.hc.core5.net.InetAddressUtils, org.apache.hc.core5.reactor.IOEventHandlerFactory, .IOReactorConfig, .IOSession, .IOSessionListener, org.apache.hc.core5.util.Args, .Timeout

HttpAsyncServer bootstrap.
Since
5.0

Field Summary

Modifier and TypeField and Description
private String
private CharCodingConfig
private ConnectionReuseStrategy
private Callback<Exception>
private final List<FilterEntry<AsyncFilterHandler>>
private final List<HandlerEntry<Supplier<AsyncServerExchangeHandler>>>
private Timeout
private Http1Config
private HttpProcessor
private IOReactorConfig
private Decorator<IOSession>
private LookupRegistry<Supplier<AsyncServerExchangeHandler>>
private IOSessionListener
private Http1StreamListener
private TlsStrategy

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public final AsyncServerBootstrap
addFilterAfter(final String existing, final String name, final AsyncFilterHandler filterHandler)

Adds the filter after the filter with the given name.

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

Adds the filter before the filter with the given name.

public final AsyncServerBootstrap
addFilterFirst(final String name, final AsyncFilterHandler filterHandler)

Add an filter to the head of the processing list.

public final AsyncServerBootstrap
addFilterLast(final String name, final AsyncFilterHandler filterHandler)

Add an filter to the tail of the processing list.

public static AsyncServerBootstrap
public HttpAsyncServer
public final AsyncServerBootstrap
register(final String
the pattern to register the handler for.
uriPattern
,
final Supplier<AsyncServerExchangeHandler>
the handler supplier.
supplier
)

Registers the given AsyncServerExchangeHandler Supplier as a default handler for URIs matching the given pattern.

public final <T> AsyncServerBootstrap
register(final String
the pattern to register the handler for.
uriPattern
,
final AsyncServerRequestHandler<T>
the handler.
requestHandler
)

Registers the given AsyncServerRequestHandler as a default handler for URIs matching the given pattern.

public final AsyncServerBootstrap
registerVirtual(final String
the host name
hostname
,
final String
the pattern to register the handler for.
uriPattern
,
final Supplier<AsyncServerExchangeHandler>
the handler supplier.
supplier
)

Registers the given AsyncServerExchangeHandler Supplier as a handler for URIs matching the given host and the pattern.

public final <T> AsyncServerBootstrap
registerVirtual(final String
the host name
hostname
,
final String
the pattern to register the handler for.
uriPattern
,
final AsyncServerRequestHandler<T>
the handler.
requestHandler
)

Registers the given AsyncServerRequestHandler as a handler for URIs matching the given host and the pattern.

public final AsyncServerBootstrap
replaceFilter(final String existing, final AsyncFilterHandler filterHandler)

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

public final AsyncServerBootstrap
setCanonicalHostName(final String canonicalHostName)

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

public final AsyncServerBootstrap
setCharCodingConfig(final CharCodingConfig charCodingConfig)

Sets connection configuration.

public final AsyncServerBootstrap
public final AsyncServerBootstrap
setExceptionCallback(final Callback<Exception> exceptionCallback)

Assigns Exception Callback instance.

public final AsyncServerBootstrap
setHttp1Config(final Http1Config http1Config)

Sets HTTP/1.1 protocol parameters.

public final AsyncServerBootstrap
public final AsyncServerBootstrap
setIOReactorConfig(final IOReactorConfig ioReactorConfig)

Sets I/O reactor configuration.

public final AsyncServerBootstrap
setIOSessionDecorator(final Decorator<IOSession> ioSessionDecorator)

Assigns IOSession Decorator instance.

public final AsyncServerBootstrap
setIOSessionListener(final IOSessionListener sessionListener)

Assigns IOSessionListener instance.

public final AsyncServerBootstrap
public final AsyncServerBootstrap
setStreamListener(final Http1StreamListener streamListener)

Assigns Http1StreamListener instance.

public final AsyncServerBootstrap
setTlsHandshakeTimeout(final Timeout handshakeTimeout)

Assigns TLS handshake Timeout.

public final AsyncServerBootstrap
setTlsStrategy(final TlsStrategy tlsStrategy)

Assigns TlsStrategy instance.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

canonicalHostNameback to summary
private String canonicalHostName
charCodingConfigback to summary
private CharCodingConfig charCodingConfig
connStrategyback to summary
private ConnectionReuseStrategy connStrategy
exceptionCallbackback to summary
private Callback<Exception> exceptionCallback
filtersback to summary
private final List<FilterEntry<AsyncFilterHandler>> filters
handlerListback to summary
private final List<HandlerEntry<Supplier<AsyncServerExchangeHandler>>> handlerList
handshakeTimeoutback to summary
private Timeout handshakeTimeout
http1Configback to summary
private Http1Config http1Config
httpProcessorback to summary
private HttpProcessor httpProcessor
ioReactorConfigback to summary
private IOReactorConfig ioReactorConfig
ioSessionDecoratorback to summary
private Decorator<IOSession> ioSessionDecorator
lookupRegistryback to summary
private LookupRegistry<Supplier<AsyncServerExchangeHandler>> lookupRegistry
sessionListenerback to summary
private IOSessionListener sessionListener
streamListenerback to summary
private Http1StreamListener streamListener
tlsStrategyback to summary
private TlsStrategy tlsStrategy

Constructor Detail

AsyncServerBootstrapback to summary
private AsyncServerBootstrap()

Method Detail

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

Adds the filter after the filter with the given name.

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

Adds the filter before the filter with the given name.

addFilterFirstback to summary
public final AsyncServerBootstrap addFilterFirst(final String name, final AsyncFilterHandler filterHandler)

Add an filter to the head of the processing list.

addFilterLastback to summary
public final AsyncServerBootstrap addFilterLast(final String name, final AsyncFilterHandler filterHandler)

Add an filter to the tail of the processing list.

bootstrapback to summary
public static AsyncServerBootstrap bootstrap()
createback to summary
public HttpAsyncServer create()
registerback to summary
public final AsyncServerBootstrap register(final String uriPattern, final Supplier<AsyncServerExchangeHandler> supplier)

Registers the given AsyncServerExchangeHandler Supplier as a default handler for URIs matching the given pattern.

Parameters
uriPattern:String

the pattern to register the handler for.

supplier:Supplier<AsyncServerExchangeHandler>

the handler supplier.

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

Registers the given AsyncServerRequestHandler as a default handler for URIs matching the given pattern.

Parameters
uriPattern:String

the pattern to register the handler for.

requestHandler:AsyncServerRequestHandler<T>

the handler.

registerVirtualback to summary
public final AsyncServerBootstrap registerVirtual(final String hostname, final String uriPattern, final Supplier<AsyncServerExchangeHandler> supplier)

Registers the given AsyncServerExchangeHandler Supplier as a handler for URIs matching the given host and the pattern.

Parameters
hostname:String

the host name

uriPattern:String

the pattern to register the handler for.

supplier:Supplier<AsyncServerExchangeHandler>

the handler supplier.

registerVirtualback to summary
public final <T> AsyncServerBootstrap registerVirtual(final String hostname, final String uriPattern, final AsyncServerRequestHandler<T> requestHandler)

Registers the given AsyncServerRequestHandler as a handler for URIs matching the given host and the pattern.

Parameters
hostname:String

the host name

uriPattern:String

the pattern to register the handler for.

requestHandler:AsyncServerRequestHandler<T>

the handler.

replaceFilterback to summary
public final AsyncServerBootstrap replaceFilter(final String existing, final AsyncFilterHandler filterHandler)

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

setCanonicalHostNameback to summary
public final AsyncServerBootstrap setCanonicalHostName(final String canonicalHostName)

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

setCharCodingConfigback to summary
public final AsyncServerBootstrap setCharCodingConfig(final CharCodingConfig charCodingConfig)

Sets connection configuration.

setConnectionReuseStrategyback to summary
public final AsyncServerBootstrap setConnectionReuseStrategy(final ConnectionReuseStrategy connStrategy)

Assigns org.apache.hc.core5.http.ConnectionReuseStrategy instance.

setExceptionCallbackback to summary
public final AsyncServerBootstrap setExceptionCallback(final Callback<Exception> exceptionCallback)

Assigns Exception Callback instance.

setHttp1Configback to summary
public final AsyncServerBootstrap setHttp1Config(final Http1Config http1Config)

Sets HTTP/1.1 protocol parameters.

setHttpProcessorback to summary
public final AsyncServerBootstrap setHttpProcessor(final HttpProcessor httpProcessor)

Assigns org.apache.hc.core5.http.protocol.HttpProcessor instance.

setIOReactorConfigback to summary
public final AsyncServerBootstrap setIOReactorConfig(final IOReactorConfig ioReactorConfig)

Sets I/O reactor configuration.

setIOSessionDecoratorback to summary
public final AsyncServerBootstrap setIOSessionDecorator(final Decorator<IOSession> ioSessionDecorator)

Assigns IOSession Decorator instance.

setIOSessionListenerback to summary
public final AsyncServerBootstrap setIOSessionListener(final IOSessionListener sessionListener)

Assigns IOSessionListener instance.

setLookupRegistryback to summary
public final AsyncServerBootstrap setLookupRegistry(final LookupRegistry<Supplier<AsyncServerExchangeHandler>> lookupRegistry)

Assigns LookupRegistry instance.

setStreamListenerback to summary
public final AsyncServerBootstrap setStreamListener(final Http1StreamListener streamListener)

Assigns Http1StreamListener instance.

Since
5.0
setTlsHandshakeTimeoutback to summary
public final AsyncServerBootstrap setTlsHandshakeTimeout(final Timeout handshakeTimeout)

Assigns TLS handshake Timeout.

setTlsStrategyback to summary
public final AsyncServerBootstrap setTlsStrategy(final TlsStrategy tlsStrategy)

Assigns TlsStrategy instance.