Class AsyncServerBootstrap
java.lang.Object
org.apache.hc.core5.http.impl.bootstrap.AsyncServerBootstrap
HttpAsyncServer
bootstrap.- Since:
- 5.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String
private CharCodingConfig
private ConnectionReuseStrategy
private final List
<FilterEntry<AsyncFilterHandler>> private final List
<HandlerEntry<Supplier<AsyncServerExchangeHandler>>> private Timeout
private Http1Config
private HttpProcessor
private IOReactorConfig
private LookupRegistry
<Supplier<AsyncServerExchangeHandler>> private IOSessionListener
private Http1StreamListener
private TlsStrategy
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal AsyncServerBootstrap
addFilterAfter
(String existing, String name, AsyncFilterHandler filterHandler) Adds the filter after the filter with the given name.final AsyncServerBootstrap
addFilterBefore
(String existing, String name, AsyncFilterHandler filterHandler) Adds the filter before the filter with the given name.final AsyncServerBootstrap
addFilterFirst
(String name, AsyncFilterHandler filterHandler) Add an filter to the head of the processing list.final AsyncServerBootstrap
addFilterLast
(String name, AsyncFilterHandler filterHandler) Add an filter to the tail of the processing list.static AsyncServerBootstrap
create()
final AsyncServerBootstrap
register
(String uriPattern, Supplier<AsyncServerExchangeHandler> supplier) Registers the givenAsyncServerExchangeHandler
Supplier
as a default handler for URIs matching the given pattern.final <T> AsyncServerBootstrap
register
(String uriPattern, AsyncServerRequestHandler<T> requestHandler) Registers the givenAsyncServerRequestHandler
as a default handler for URIs matching the given pattern.final AsyncServerBootstrap
registerVirtual
(String hostname, String uriPattern, Supplier<AsyncServerExchangeHandler> supplier) Registers the givenAsyncServerExchangeHandler
Supplier
as a handler for URIs matching the given host and the pattern.final <T> AsyncServerBootstrap
registerVirtual
(String hostname, String uriPattern, AsyncServerRequestHandler<T> requestHandler) Registers the givenAsyncServerRequestHandler
as a handler for URIs matching the given host and the pattern.final AsyncServerBootstrap
replaceFilter
(String existing, AsyncFilterHandler filterHandler) Replace an existing filter with the given name with new filter.final AsyncServerBootstrap
setCanonicalHostName
(String canonicalHostName) Sets canonical name (fully qualified domain name) of the server.final AsyncServerBootstrap
setCharCodingConfig
(CharCodingConfig charCodingConfig) Sets connection configuration.final AsyncServerBootstrap
setConnectionReuseStrategy
(ConnectionReuseStrategy connStrategy) AssignsConnectionReuseStrategy
instance.final AsyncServerBootstrap
setExceptionCallback
(Callback<Exception> exceptionCallback) final AsyncServerBootstrap
setHttp1Config
(Http1Config http1Config) Sets HTTP/1.1 protocol parameters.final AsyncServerBootstrap
setHttpProcessor
(HttpProcessor httpProcessor) AssignsHttpProcessor
instance.final AsyncServerBootstrap
setIOReactorConfig
(IOReactorConfig ioReactorConfig) Sets I/O reactor configuration.final AsyncServerBootstrap
setIOSessionDecorator
(Decorator<IOSession> ioSessionDecorator) final AsyncServerBootstrap
setIOSessionListener
(IOSessionListener sessionListener) AssignsIOSessionListener
instance.final AsyncServerBootstrap
setLookupRegistry
(LookupRegistry<Supplier<AsyncServerExchangeHandler>> lookupRegistry) AssignsLookupRegistry
instance.final AsyncServerBootstrap
setStreamListener
(Http1StreamListener streamListener) AssignsHttp1StreamListener
instance.final AsyncServerBootstrap
setTlsHandshakeTimeout
(Timeout handshakeTimeout) Assigns TLS handshakeTimeout
.final AsyncServerBootstrap
setTlsStrategy
(TlsStrategy tlsStrategy) AssignsTlsStrategy
instance.
-
Field Details
-
handlerList
-
filters
-
canonicalHostName
-
lookupRegistry
-
ioReactorConfig
-
http1Config
-
charCodingConfig
-
httpProcessor
-
connStrategy
-
tlsStrategy
-
handshakeTimeout
-
ioSessionDecorator
-
exceptionCallback
-
sessionListener
-
streamListener
-
-
Constructor Details
-
AsyncServerBootstrap
private AsyncServerBootstrap()
-
-
Method Details
-
bootstrap
-
setCanonicalHostName
Sets canonical name (fully qualified domain name) of the server. -
setIOReactorConfig
Sets I/O reactor configuration. -
setHttp1Config
Sets HTTP/1.1 protocol parameters. -
setCharCodingConfig
Sets connection configuration. -
setHttpProcessor
AssignsHttpProcessor
instance. -
setConnectionReuseStrategy
AssignsConnectionReuseStrategy
instance. -
setTlsStrategy
AssignsTlsStrategy
instance. -
setTlsHandshakeTimeout
Assigns TLS handshakeTimeout
. -
setIOSessionDecorator
-
setExceptionCallback
-
setIOSessionListener
AssignsIOSessionListener
instance. -
setLookupRegistry
public final AsyncServerBootstrap setLookupRegistry(LookupRegistry<Supplier<AsyncServerExchangeHandler>> lookupRegistry) AssignsLookupRegistry
instance. -
setStreamListener
AssignsHttp1StreamListener
instance.- Since:
- 5.0
-
register
public final AsyncServerBootstrap register(String uriPattern, Supplier<AsyncServerExchangeHandler> supplier) Registers the givenAsyncServerExchangeHandler
Supplier
as a default handler for URIs matching the given pattern.- Parameters:
uriPattern
- the pattern to register the handler for.supplier
- the handler supplier.
-
registerVirtual
public final AsyncServerBootstrap registerVirtual(String hostname, String uriPattern, Supplier<AsyncServerExchangeHandler> supplier) Registers the givenAsyncServerExchangeHandler
Supplier
as a handler for URIs matching the given host and the pattern.- Parameters:
hostname
- the host nameuriPattern
- the pattern to register the handler for.supplier
- the handler supplier.
-
register
public final <T> AsyncServerBootstrap register(String uriPattern, AsyncServerRequestHandler<T> requestHandler) Registers the givenAsyncServerRequestHandler
as a default handler for URIs matching the given pattern.- Parameters:
uriPattern
- the pattern to register the handler for.requestHandler
- the handler.
-
registerVirtual
public final <T> AsyncServerBootstrap registerVirtual(String hostname, String uriPattern, AsyncServerRequestHandler<T> requestHandler) Registers the givenAsyncServerRequestHandler
as a handler for URIs matching the given host and the pattern.- Parameters:
hostname
- the host nameuriPattern
- the pattern to register the handler for.requestHandler
- the handler.
-
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
Replace an existing filter with the given name with new filter. -
addFilterFirst
Add an filter to the head of the processing list. -
addFilterLast
Add an filter to the tail of the processing list. -
create
-