Class AsyncServerBootstrap
java.lang.Object
org.apache.hc.core5.http.impl.bootstrap.AsyncServerBootstrap
HttpAsyncServer bootstrap.- Since:
- 5.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Stringprivate CharCodingConfigprivate ConnectionReuseStrategyprivate final List<FilterEntry<AsyncFilterHandler>> private final List<HandlerEntry<Supplier<AsyncServerExchangeHandler>>> private Timeoutprivate Http1Configprivate HttpProcessorprivate IOReactorConfigprivate LookupRegistry<Supplier<AsyncServerExchangeHandler>> private IOSessionListenerprivate Http1StreamListenerprivate TlsStrategy -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal AsyncServerBootstrapaddFilterAfter(String existing, String name, AsyncFilterHandler filterHandler) Adds the filter after the filter with the given name.final AsyncServerBootstrapaddFilterBefore(String existing, String name, AsyncFilterHandler filterHandler) Adds the filter before the filter with the given name.final AsyncServerBootstrapaddFilterFirst(String name, AsyncFilterHandler filterHandler) Add an filter to the head of the processing list.final AsyncServerBootstrapaddFilterLast(String name, AsyncFilterHandler filterHandler) Add an filter to the tail of the processing list.static AsyncServerBootstrapcreate()final AsyncServerBootstrapregister(String uriPattern, Supplier<AsyncServerExchangeHandler> supplier) Registers the givenAsyncServerExchangeHandlerSupplieras a default handler for URIs matching the given pattern.final <T> AsyncServerBootstrapregister(String uriPattern, AsyncServerRequestHandler<T> requestHandler) Registers the givenAsyncServerRequestHandleras a default handler for URIs matching the given pattern.final AsyncServerBootstrapregisterVirtual(String hostname, String uriPattern, Supplier<AsyncServerExchangeHandler> supplier) Registers the givenAsyncServerExchangeHandlerSupplieras a handler for URIs matching the given host and the pattern.final <T> AsyncServerBootstrapregisterVirtual(String hostname, String uriPattern, AsyncServerRequestHandler<T> requestHandler) Registers the givenAsyncServerRequestHandleras a handler for URIs matching the given host and the pattern.final AsyncServerBootstrapreplaceFilter(String existing, AsyncFilterHandler filterHandler) Replace an existing filter with the given name with new filter.final AsyncServerBootstrapsetCanonicalHostName(String canonicalHostName) Sets canonical name (fully qualified domain name) of the server.final AsyncServerBootstrapsetCharCodingConfig(CharCodingConfig charCodingConfig) Sets connection configuration.final AsyncServerBootstrapsetConnectionReuseStrategy(ConnectionReuseStrategy connStrategy) AssignsConnectionReuseStrategyinstance.final AsyncServerBootstrapsetExceptionCallback(Callback<Exception> exceptionCallback) final AsyncServerBootstrapsetHttp1Config(Http1Config http1Config) Sets HTTP/1.1 protocol parameters.final AsyncServerBootstrapsetHttpProcessor(HttpProcessor httpProcessor) AssignsHttpProcessorinstance.final AsyncServerBootstrapsetIOReactorConfig(IOReactorConfig ioReactorConfig) Sets I/O reactor configuration.final AsyncServerBootstrapsetIOSessionDecorator(Decorator<IOSession> ioSessionDecorator) final AsyncServerBootstrapsetIOSessionListener(IOSessionListener sessionListener) AssignsIOSessionListenerinstance.final AsyncServerBootstrapsetLookupRegistry(LookupRegistry<Supplier<AsyncServerExchangeHandler>> lookupRegistry) AssignsLookupRegistryinstance.final AsyncServerBootstrapsetStreamListener(Http1StreamListener streamListener) AssignsHttp1StreamListenerinstance.final AsyncServerBootstrapsetTlsHandshakeTimeout(Timeout handshakeTimeout) Assigns TLS handshakeTimeout.final AsyncServerBootstrapsetTlsStrategy(TlsStrategy tlsStrategy) AssignsTlsStrategyinstance.
-
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
AssignsHttpProcessorinstance. -
setConnectionReuseStrategy
AssignsConnectionReuseStrategyinstance. -
setTlsStrategy
AssignsTlsStrategyinstance. -
setTlsHandshakeTimeout
Assigns TLS handshakeTimeout. -
setIOSessionDecorator
-
setExceptionCallback
-
setIOSessionListener
AssignsIOSessionListenerinstance. -
setLookupRegistry
public final AsyncServerBootstrap setLookupRegistry(LookupRegistry<Supplier<AsyncServerExchangeHandler>> lookupRegistry) AssignsLookupRegistryinstance. -
setStreamListener
AssignsHttp1StreamListenerinstance.- Since:
- 5.0
-
register
public final AsyncServerBootstrap register(String uriPattern, Supplier<AsyncServerExchangeHandler> supplier) Registers the givenAsyncServerExchangeHandlerSupplieras 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 givenAsyncServerExchangeHandlerSupplieras 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 givenAsyncServerRequestHandleras 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 givenAsyncServerRequestHandleras 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
-