public class H2ServerBootstrap extends Object
HttpAsyncServer
bootstrap.Modifier and Type | Method and Description |
---|---|
H2ServerBootstrap |
addFilterAfter(String existing,
String name,
AsyncFilterHandler filterHandler)
Adds the filter after the filter with the given name.
|
H2ServerBootstrap |
addFilterBefore(String existing,
String name,
AsyncFilterHandler filterHandler)
Adds the filter before the filter with the given name.
|
H2ServerBootstrap |
addFilterFirst(String name,
AsyncFilterHandler filterHandler)
Add an filter to the head of the processing list.
|
H2ServerBootstrap |
addFilterLast(String name,
AsyncFilterHandler filterHandler)
Add an filter to the tail of the processing list.
|
static H2ServerBootstrap |
bootstrap() |
HttpAsyncServer |
create() |
<T> H2ServerBootstrap |
register(String uriPattern,
AsyncServerRequestHandler<T> requestHandler)
Registers the given
AsyncServerRequestHandler as a default handler for URIs
matching the given pattern. |
H2ServerBootstrap |
register(String uriPattern,
Supplier<AsyncServerExchangeHandler> supplier)
Registers the given
AsyncServerExchangeHandler Supplier as a default handler for URIs
matching the given pattern. |
<T> H2ServerBootstrap |
registerVirtual(String hostname,
String uriPattern,
AsyncServerRequestHandler<T> requestHandler)
Registers the given
AsyncServerRequestHandler as a handler for URIs
matching the given host and the pattern. |
H2ServerBootstrap |
registerVirtual(String hostname,
String uriPattern,
Supplier<AsyncServerExchangeHandler> supplier)
Registers the given
AsyncServerExchangeHandler Supplier as a handler for URIs
matching the given host and the pattern. |
H2ServerBootstrap |
replaceFilter(String existing,
AsyncFilterHandler filterHandler)
Replace an existing filter with the given name with new filter.
|
H2ServerBootstrap |
setCanonicalHostName(String canonicalHostName)
Sets canonical name (fully qualified domain name) of the server.
|
H2ServerBootstrap |
setCharset(CharCodingConfig charCodingConfig)
Sets message char coding.
|
H2ServerBootstrap |
setExceptionCallback(Callback<Exception> exceptionCallback)
|
H2ServerBootstrap |
setH2Config(H2Config h2Config)
Sets HTTP/2 protocol parameters
|
H2ServerBootstrap |
setHandshakeTimeout(Timeout handshakeTimeout) |
H2ServerBootstrap |
setHttp1Config(Http1Config http1Config)
Sets HTTP/1.1 protocol parameters
|
H2ServerBootstrap |
setHttpProcessor(HttpProcessor httpProcessor)
Assigns
HttpProcessor instance. |
H2ServerBootstrap |
setIOReactorConfig(IOReactorConfig ioReactorConfig)
Sets I/O reactor configuration.
|
H2ServerBootstrap |
setIOSessionDecorator(Decorator<IOSession> ioSessionDecorator)
|
H2ServerBootstrap |
setIOSessionListener(IOSessionListener sessionListener)
Assigns
IOSessionListener instance. |
H2ServerBootstrap |
setLookupRegistry(LookupRegistry<Supplier<AsyncServerExchangeHandler>> lookupRegistry)
Assigns
LookupRegistry instance. |
H2ServerBootstrap |
setStreamListener(H2StreamListener h2StreamListener)
Assigns
H2StreamListener instance. |
H2ServerBootstrap |
setStreamListener(Http1StreamListener http1StreamListener)
Assigns
Http1StreamListener instance. |
H2ServerBootstrap |
setTlsStrategy(TlsStrategy tlsStrategy)
Assigns
TlsStrategy instance. |
H2ServerBootstrap |
setVersionPolicy(HttpVersionPolicy versionPolicy)
Sets HTTP protocol version policy
|
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.public final H2ServerBootstrap setLookupRegistry(LookupRegistry<Supplier<AsyncServerExchangeHandler>> lookupRegistry)
LookupRegistry
instance.public 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 registerVirtual(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.public final <T> H2ServerBootstrap register(String uriPattern, AsyncServerRequestHandler<T> requestHandler)
AsyncServerRequestHandler
as a default handler for URIs
matching the given pattern.uriPattern
- the pattern to register the handler for.requestHandler
- the handler.public final <T> H2ServerBootstrap registerVirtual(String hostname, String uriPattern, AsyncServerRequestHandler<T> requestHandler)
AsyncServerRequestHandler
as a handler for URIs
matching the given host and the pattern.hostname
- the host nameuriPattern
- the pattern to register the handler for.requestHandler
- the handler.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–2022 The Apache Software Foundation. All rights reserved.