public class AsyncServerBootstrap extends Object
HttpAsyncServer bootstrap.public static AsyncServerBootstrap bootstrap()
public final AsyncServerBootstrap setCanonicalHostName(String canonicalHostName)
canonicalHostName - canonical name (fully qualified domain name) of the server.public final AsyncServerBootstrap setIOReactorConfig(IOReactorConfig ioReactorConfig)
ioReactorConfig - I/O reactor configuration.public final AsyncServerBootstrap setHttp1Config(Http1Config http1Config)
http1Config - HTTP/1.1 protocol parameters.public final AsyncServerBootstrap setCharCodingConfig(CharCodingConfig charCodingConfig)
charCodingConfig - char coding configuration.public final AsyncServerBootstrap setHttpProcessor(HttpProcessor httpProcessor)
HttpProcessor instance.httpProcessor - HttpProcessor instance.public final AsyncServerBootstrap setConnectionReuseStrategy(ConnectionReuseStrategy connStrategy)
ConnectionReuseStrategy instance.connStrategy - ConnectionReuseStrategy instance.public final AsyncServerBootstrap setTlsStrategy(TlsStrategy tlsStrategy)
TlsStrategy instance.tlsStrategy - TlsStrategy instance.public final AsyncServerBootstrap setTlsHandshakeTimeout(Timeout handshakeTimeout)
Timeout.handshakeTimeout - TLS handshake Timeout.public final AsyncServerBootstrap setIOSessionDecorator(Decorator<IOSession> ioSessionDecorator)
public final AsyncServerBootstrap setExceptionCallback(Callback<Exception> exceptionCallback)
public final AsyncServerBootstrap setIOSessionListener(IOSessionListener sessionListener)
IOSessionListener instance.sessionListener - IOSessionListener instance.@Deprecated public final AsyncServerBootstrap setLookupRegistry(LookupRegistry<Supplier<AsyncServerExchangeHandler>> lookupRegistry)
RequestRouter.lookupRegistry - LookupRegistry for Suppliers of AsyncServerExchangeHandler.public final AsyncServerBootstrap setRequestRouter(HttpRequestMapper<Supplier<AsyncServerExchangeHandler>> requestRouter)
HttpRequestMapper instance.requestRouter - HttpRequestMapper instance.RequestRouterpublic final AsyncServerBootstrap setStreamListener(Http1StreamListener streamListener)
Http1StreamListener instance.streamListener - Http1StreamListener instance.public final AsyncServerBootstrap register(String uriPattern, Supplier<AsyncServerExchangeHandler> supplier)
AsyncServerExchangeHandler Supplier as a default handler for URIs
matching the given pattern.uriPattern - the non-null pattern to register the handler for.supplier - the non-null handler supplier.public final AsyncServerBootstrap register(String hostname, String uriPattern, Supplier<AsyncServerExchangeHandler> supplier)
AsyncServerExchangeHandler Supplier as a handler for URIs
matching the given host and pattern.hostname - the non-null host name.uriPattern - the non-null pattern to register the handler for.supplier - the non-null handler supplier.@Deprecated public final AsyncServerBootstrap registerVirtual(String hostname, String uriPattern, Supplier<AsyncServerExchangeHandler> supplier)
register(String, String, Supplier).AsyncServerExchangeHandler Supplier as a handler for URIs
matching the given host and pattern.hostname - the host name.uriPattern - the pattern to register the handler for.supplier - the handler supplier.public final <T> AsyncServerBootstrap register(String uriPattern, AsyncServerRequestHandler<T> requestHandler)
AsyncServerRequestHandler as a default handler for URIs
matching the given pattern.T - the AsyncServerRequestHandler request representation type.uriPattern - the pattern to register the handler for.requestHandler - the handler.public final <T> AsyncServerBootstrap register(String hostname, String uriPattern, AsyncServerRequestHandler<T> requestHandler)
AsyncServerRequestHandler as a handler for URIs
matching the given host and pattern.T - the request type.hostname - the host nameuriPattern - the pattern to register the handler for.requestHandler - the handler.@Deprecated public final <T> AsyncServerBootstrap registerVirtual(String hostname, String uriPattern, AsyncServerRequestHandler<T> requestHandler)
register(String, String, AsyncServerRequestHandler).T - the request type.public final AsyncServerBootstrap addFilterBefore(String existing, String name, AsyncFilterHandler filterHandler)
public final AsyncServerBootstrap addFilterAfter(String existing, String name, AsyncFilterHandler filterHandler)
public final AsyncServerBootstrap replaceFilter(String existing, AsyncFilterHandler filterHandler)
public final AsyncServerBootstrap addFilterFirst(String name, AsyncFilterHandler filterHandler)
public final AsyncServerBootstrap addFilterLast(String name, AsyncFilterHandler filterHandler)
public HttpAsyncServer create()
Copyright © 2005–2021 The Apache Software Foundation. All rights reserved.