public final class VirtualHost extends Object
VirtualHost contains the following information:
SslContext if TLS is enabledHttpServices and their RoutesVirtualHostBuilder| Modifier and Type | Method and Description |
|---|---|
org.slf4j.Logger |
accessLogger()
Returns the
Logger which is used for writing access logs of this virtual host. |
AccessLogWriter |
accessLogWriter()
Returns the access log writer.
|
String |
defaultHostname()
Returns the default hostname of this virtual host.
|
long |
defaultMaxRequestLength()
Deprecated.
Use
maxRequestLength(). |
long |
defaultRequestTimeoutMillis()
Deprecated.
|
Routed<ServiceConfig> |
findServiceConfig(RoutingContext routingCtx)
|
Routed<ServiceConfig> |
findServiceConfig(RoutingContext routingCtx,
boolean useFallbackService)
|
String |
hostnamePattern()
Returns the hostname pattern of this virtual host, as defined in
the section 3.1 of RFC2818.
|
long |
maxRequestLength()
Returns the maximum allowed length of the content decoded at the session layer.
|
long |
requestTimeoutMillis()
Returns the timeout of a request.
|
Server |
server()
Returns the
Server where this VirtualHost belongs to. |
List<ServiceConfig> |
serviceConfigs()
Returns the information about the
HttpServices bound to this virtual host. |
boolean |
shutdownAccessLogWriterOnStop()
Tells whether the
AccessLogWriter is shut down when the Server stops. |
io.netty.handler.ssl.SslContext |
sslContext()
Returns the
SslContext of this virtual host. |
String |
toString() |
boolean |
verboseResponses()
Returns whether the verbose response mode is enabled.
|
public Server server()
Server where this VirtualHost belongs to.public String defaultHostname()
public String hostnamePattern()
public io.netty.handler.ssl.SslContext sslContext()
SslContext of this virtual host.public List<ServiceConfig> serviceConfigs()
HttpServices bound to this virtual host.public org.slf4j.Logger accessLogger()
Logger which is used for writing access logs of this virtual host.@Deprecated public long defaultRequestTimeoutMillis()
requestTimeoutMillis().ServiceConfig.requestTimeoutMillis()public long requestTimeoutMillis()
ServiceConfig.requestTimeoutMillis()@Deprecated public long defaultMaxRequestLength()
maxRequestLength().ServiceConfig.maxRequestLength()public long maxRequestLength()
ServiceConfig.maxRequestLength()public boolean verboseResponses()
ServiceConfig.verboseResponses()public AccessLogWriter accessLogWriter()
ServiceConfig.accessLogWriter()public boolean shutdownAccessLogWriterOnStop()
AccessLogWriter is shut down when the Server stops.public Routed<ServiceConfig> findServiceConfig(RoutingContext routingCtx)
routingCtx - a context to find the HttpService.ServiceConfig wrapped by a Routed if there's a match.
Routed.empty() if there's no match.public Routed<ServiceConfig> findServiceConfig(RoutingContext routingCtx, boolean useFallbackService)
routingCtx - a context to find the HttpService.useFallbackService - whether to use the fallback HttpService when there is no match.
If true, the returned Routed will always be present.ServiceConfig wrapped by a Routed if there's a match.
Routed.empty() if there's no match.Copyright © 2020 LeanCloud. All rights reserved.