public final class ChainedVirtualHostBuilder
extends java.lang.Object
VirtualHost
.
This class can only be created through the ServerBuilder.withDefaultVirtualHost()
or
ServerBuilder.withVirtualHost(String)
method of the ServerBuilder
.
Call and()
method can also return to ServerBuilder
.
ServerBuilder
,
PathMapping
,
VirtualHostBuilder
Modifier and Type | Method and Description |
---|---|
ServerBuilder |
and()
Returns the parent
ServerBuilder . |
protected VirtualHost |
build()
Creates a new
VirtualHost . |
<T extends Service<T_I,T_O>,T_I extends Request,T_O extends Response,R extends Service<R_I,R_O>,R_I extends Request,R_O extends Response> |
decorator(java.util.function.Function<T,R> decorator)
Decorates all
Service s with the specified decorator . |
B |
service(PathMapping pathMapping,
Service<?,?> service)
Binds the specified
Service at the specified PathMapping . |
B |
service(PathMapping pathMapping,
Service<?,?> service,
java.lang.String loggerName)
Deprecated.
Use a logging framework integration such as
RequestContextExportingAppender in
armeria-logback . |
B |
serviceAt(java.lang.String exactPath,
Service<?,?> service)
Binds the specified
Service at the specified exact path. |
B |
serviceUnder(java.lang.String pathPrefix,
Service<?,?> service)
Binds the specified
Service under the specified directory.. |
B |
sslContext(SessionProtocol protocol,
java.io.File keyCertChainFile,
java.io.File keyFile)
Sets the
SslContext of this VirtualHost from the specified SessionProtocol ,
keyCertChainFile and cleartext keyFile . |
B |
sslContext(SessionProtocol protocol,
java.io.File keyCertChainFile,
java.io.File keyFile,
java.lang.String keyPassword)
Sets the
SslContext of this VirtualHost from the specified SessionProtocol ,
keyCertChainFile , keyFile and keyPassword . |
B |
sslContext(io.netty.handler.ssl.SslContext sslContext)
Sets the
SslContext of this VirtualHost . |
java.lang.String |
toString() |
public ServerBuilder and()
ServerBuilder
.ServerBuilder
.public B sslContext(io.netty.handler.ssl.SslContext sslContext)
SslContext
of this VirtualHost
.public B sslContext(SessionProtocol protocol, java.io.File keyCertChainFile, java.io.File keyFile) throws javax.net.ssl.SSLException
SslContext
of this VirtualHost
from the specified SessionProtocol
,
keyCertChainFile
and cleartext keyFile
.javax.net.ssl.SSLException
public B sslContext(SessionProtocol protocol, java.io.File keyCertChainFile, java.io.File keyFile, java.lang.String keyPassword) throws javax.net.ssl.SSLException
SslContext
of this VirtualHost
from the specified SessionProtocol
,
keyCertChainFile
, keyFile
and keyPassword
.javax.net.ssl.SSLException
public B serviceAt(java.lang.String exactPath, Service<?,?> service)
Service
at the specified exact path.public B serviceUnder(java.lang.String pathPrefix, Service<?,?> service)
Service
under the specified directory..public B service(PathMapping pathMapping, Service<?,?> service)
Service
at the specified PathMapping
.@Deprecated public B service(PathMapping pathMapping, Service<?,?> service, java.lang.String loggerName)
RequestContextExportingAppender
in
armeria-logback
.public <T extends Service<T_I,T_O>,T_I extends Request,T_O extends Response,R extends Service<R_I,R_O>,R_I extends Request,R_O extends Response> B decorator(java.util.function.Function<T,R> decorator)
Service
s with the specified decorator
.protected VirtualHost build()
VirtualHost
.public java.lang.String toString()
toString
in class java.lang.Object