public class H2ServerBootstrap extends Object
HttpAsyncServer bootstrap.public static H2ServerBootstrap bootstrap()
public final H2ServerBootstrap setCanonicalHostName(String canonicalHostName)
public final H2ServerBootstrap setIOReactorConfig(IOReactorConfig ioReactorConfig)
public final H2ServerBootstrap setHttpProcessor(HttpProcessor httpProcessor)
HttpProcessor instance.public final H2ServerBootstrap setVersionPolicy(HttpVersionPolicy versionPolicy)
public final H2ServerBootstrap setH2Config(H2Config h2Config)
public final H2ServerBootstrap setHttp1Config(Http1Config http1Config)
public final H2ServerBootstrap setCharset(CharCodingConfig charCodingConfig)
public final H2ServerBootstrap setTlsStrategy(TlsStrategy tlsStrategy)
TlsStrategy instance.public final H2ServerBootstrap setHandshakeTimeout(Timeout handshakeTimeout)
public final H2ServerBootstrap setIOSessionDecorator(Decorator<IOSession> ioSessionDecorator)
public final H2ServerBootstrap setExceptionCallback(Callback<Exception> exceptionCallback)
public final H2ServerBootstrap setIOSessionListener(IOSessionListener sessionListener)
IOSessionListener instance.public final H2ServerBootstrap setStreamListener(H2StreamListener h2StreamListener)
H2StreamListener instance.public final H2ServerBootstrap setStreamListener(Http1StreamListener http1StreamListener)
Http1StreamListener instance.@Deprecated public final H2ServerBootstrap setLookupRegistry(LookupRegistry<Supplier<AsyncServerExchangeHandler>> lookupRegistry)
RequestRouter.public final H2ServerBootstrap setRequestRouter(HttpRequestMapper<Supplier<AsyncServerExchangeHandler>> requestRouter)
HttpRequestMapper instance.RequestRouterpublic final H2ServerBootstrap register(String uriPattern, Supplier<AsyncServerExchangeHandler> supplier)
AsyncServerExchangeHandler Supplier as a default handler for URIs
matching the given pattern.uriPattern - the pattern to register the handler for.supplier - the handler supplier.public final H2ServerBootstrap register(String hostname, String uriPattern, Supplier<AsyncServerExchangeHandler> supplier)
AsyncServerExchangeHandler Supplier as a handler for URIs
matching the given host and the pattern.hostname - the host nameuriPattern - the pattern to register the handler for.supplier - the handler supplier.@Deprecated public final H2ServerBootstrap registerVirtual(String hostname, String uriPattern, Supplier<AsyncServerExchangeHandler> supplier)
register(String, String, Supplier).public final <T> H2ServerBootstrap register(String uriPattern, AsyncServerRequestHandler<T> requestHandler)
AsyncServerRequestHandler as a default handler for URIs
matching the given pattern.T - request handler representation.uriPattern - the pattern to register the handler for.requestHandler - the handler.public final <T> H2ServerBootstrap register(String hostname, String uriPattern, AsyncServerRequestHandler<T> requestHandler)
AsyncServerRequestHandler as a handler for URIs
matching the given host and the pattern.T - request handler representation.hostname - the host nameuriPattern - the pattern to register the handler for.requestHandler - the handler.@Deprecated public final <T> H2ServerBootstrap registerVirtual(String hostname, String uriPattern, AsyncServerRequestHandler<T> requestHandler)
register(String, String, Supplier).T - request handler representation.public final H2ServerBootstrap addFilterBefore(String existing, String name, AsyncFilterHandler filterHandler)
public final H2ServerBootstrap addFilterAfter(String existing, String name, AsyncFilterHandler filterHandler)
public final H2ServerBootstrap replaceFilter(String existing, AsyncFilterHandler filterHandler)
public final H2ServerBootstrap addFilterFirst(String name, AsyncFilterHandler filterHandler)
public final H2ServerBootstrap addFilterLast(String name, AsyncFilterHandler filterHandler)
public HttpAsyncServer create()
Copyright © 2005–2021 The Apache Software Foundation. All rights reserved.