| Modifier and Type | Method and Description |
|---|---|
AccessLogWriter |
accessLogWriter()
Deprecated.
|
ScheduledExecutorService |
blockingTaskExecutor()
Returns the
ScheduledExecutorService dedicated to the execution of blocking tasks or invocations. |
Map<io.netty.channel.ChannelOption<?>,?> |
channelOptions()
Returns the
ChannelOptions and their values of Server's server sockets. |
Map<io.netty.channel.ChannelOption<?>,?> |
childChannelOptions()
Returns the
ChannelOptions and their values of sockets accepted by Server. |
Predicate<? super InetAddress> |
clientAddressFilter()
Returns a filter which evaluates whether an
InetAddress can be used as a client address. |
Function<? super ProxiedAddresses,? extends InetSocketAddress> |
clientAddressMapper()
Returns a
Function to use when determining the client address from ProxiedAddresses. |
List<ClientAddressSource> |
clientAddressSources()
Returns a list of
ClientAddressSources which are used to determine where to look for
the client address, in the order of preference. |
Predicate<? super InetAddress> |
clientAddressTrustedProxyFilter()
Returns a filter which evaluates whether an
InetAddress of a remote endpoint is trusted. |
long |
defaultMaxRequestLength()
Deprecated.
|
long |
defaultRequestTimeoutMillis()
Deprecated.
|
VirtualHost |
defaultVirtualHost()
Returns the default
VirtualHost, which is used when no other VirtualHosts match the
host name of a client request. e.g. the "Host" header in HTTP or host name in TLS SNI extension |
VirtualHost |
findVirtualHost(String hostname)
Finds the
VirtualHost that matches the specified hostname. |
List<VirtualHost> |
findVirtualHosts(HttpService service)
|
Duration |
gracefulShutdownQuietPeriod()
Returns the number of milliseconds to wait for active requests to go end before shutting down.
|
Duration |
gracefulShutdownTimeout()
Returns the number of milliseconds to wait before shutting down the server regardless of active
requests.
|
int |
http1MaxChunkSize()
Returns the maximum length of each chunk in an HTTP/1 response content.
|
int |
http1MaxHeaderSize()
Returns the maximum length of all headers in an HTTP/1 response.
|
int |
http1MaxInitialLineLength()
Returns the maximum length of an HTTP/1 response initial line.
|
int |
http2InitialConnectionWindowSize()
Returns the initial connection-level HTTP/2 flow control window size.
|
int |
http2InitialStreamWindowSize()
Returns the initial stream-level HTTP/2 flow control window size.
|
int |
http2MaxFrameSize()
Returns the maximum size of HTTP/2 frames that can be received.
|
long |
http2MaxHeaderListSize()
Returns the maximum size of headers that can be received.
|
long |
http2MaxStreamsPerConnection()
Returns the maximum number of concurrent streams per HTTP/2 connection.
|
long |
idleTimeoutMillis()
Returns the idle timeout of a connection in milliseconds for keep-alive.
|
boolean |
isDateHeaderEnabled()
Returns whether the response header will include default
"Date" header. |
boolean |
isServerHeaderEnabled()
Returns whether the response header will include default
"Server" header. |
int |
maxNumConnections()
Returns the maximum allowed number of open connections.
|
long |
maxRequestLength()
Deprecated.
|
MeterRegistry |
meterRegistry()
Returns the
MeterRegistry that collects various stats. |
List<ServerPort> |
ports()
Returns the
ServerPorts to listen on. |
int |
proxyProtocolMaxTlvSize()
Returns the maximum size of additional data (TLV, Tag-Length-Value).
|
Supplier<? extends RequestId> |
requestIdGenerator()
|
long |
requestTimeoutMillis()
Deprecated.
|
Server |
server()
Returns the
Server. |
List<ServiceConfig> |
serviceConfigs()
Returns the information of all available
HttpServices in the Server. |
boolean |
shutdownAccessLogWriterOnStop()
|
boolean |
shutdownBlockingTaskExecutorOnStop()
|
boolean |
shutdownWorkerGroupOnStop()
Returns whether the worker
EventLoopGroup is shut down when the Server stops. |
String |
toString() |
boolean |
verboseResponses()
Deprecated.
|
List<VirtualHost> |
virtualHosts()
Returns the
List of available VirtualHosts. |
io.netty.channel.EventLoopGroup |
workerGroup()
Returns the worker
EventLoopGroup which is responsible for performing socket I/O and running
Service.serve(ServiceRequestContext, Request). |
public List<ServerPort> ports()
ServerPorts to listen on.Server.activePorts()public VirtualHost defaultVirtualHost()
VirtualHost, which is used when no other VirtualHosts match the
host name of a client request. e.g. the "Host" header in HTTP or host name in TLS SNI extensionvirtualHosts()public List<VirtualHost> virtualHosts()
List of available VirtualHosts.List of available VirtualHosts where its last VirtualHost is
defaultVirtualHost()public VirtualHost findVirtualHost(String hostname)
VirtualHost that matches the specified hostname. If there's no match, the
defaultVirtualHost() is returned.public List<VirtualHost> findVirtualHosts(HttpService service)
List of VirtualHosts that contains the specified HttpService.
If there's no match, an empty List is returned. Note that this is potentially an expensive
operation and thus should not be used in a performance-sensitive path.public List<ServiceConfig> serviceConfigs()
HttpServices in the Server.public io.netty.channel.EventLoopGroup workerGroup()
EventLoopGroup which is responsible for performing socket I/O and running
Service.serve(ServiceRequestContext, Request).public boolean shutdownWorkerGroupOnStop()
EventLoopGroup is shut down when the Server stops.public Map<io.netty.channel.ChannelOption<?>,?> channelOptions()
ChannelOptions and their values of Server's server sockets.public Map<io.netty.channel.ChannelOption<?>,?> childChannelOptions()
ChannelOptions and their values of sockets accepted by Server.public int maxNumConnections()
public long idleTimeoutMillis()
@Deprecated public long defaultRequestTimeoutMillis()
ServiceConfig.requestTimeoutMillis() or
VirtualHost.requestTimeoutMillis().@Deprecated public long requestTimeoutMillis()
ServiceConfig.requestTimeoutMillis() or
VirtualHost.requestTimeoutMillis().@Deprecated public long defaultMaxRequestLength()
ServiceConfig.maxRequestLength() or
VirtualHost.maxRequestLength().@Deprecated public long maxRequestLength()
ServiceConfig.maxRequestLength() or
VirtualHost.maxRequestLength().@Deprecated public boolean verboseResponses()
ServiceConfig.verboseResponses() or
VirtualHost.verboseResponses().public int http1MaxInitialLineLength()
public int http1MaxHeaderSize()
public int http1MaxChunkSize()
public int http2InitialConnectionWindowSize()
public int http2InitialStreamWindowSize()
public long http2MaxStreamsPerConnection()
public int http2MaxFrameSize()
public long http2MaxHeaderListSize()
public Duration gracefulShutdownQuietPeriod()
0 means the server will stop right away without waiting.public Duration gracefulShutdownTimeout()
public ScheduledExecutorService blockingTaskExecutor()
ScheduledExecutorService dedicated to the execution of blocking tasks or invocations.
Note that the ScheduledExecutorService returned by this method does not set the
ServiceRequestContext when executing a submitted task.
Use ServiceRequestContext.blockingTaskExecutor() if possible.public boolean shutdownBlockingTaskExecutorOnStop()
public MeterRegistry meterRegistry()
MeterRegistry that collects various stats.@Deprecated public AccessLogWriter accessLogWriter()
ServiceConfig.accessLogWriter() or
VirtualHost.accessLogWriter().@Deprecated public boolean shutdownAccessLogWriterOnStop()
ServiceConfig.shutdownAccessLogWriterOnStop() or
VirtualHost.shutdownAccessLogWriterOnStop().AccessLogWriter is shut down when the Server stops.public int proxyProtocolMaxTlvSize()
public List<ClientAddressSource> clientAddressSources()
ClientAddressSources which are used to determine where to look for
the client address, in the order of preference.public Predicate<? super InetAddress> clientAddressTrustedProxyFilter()
InetAddress of a remote endpoint is trusted.public Predicate<? super InetAddress> clientAddressFilter()
InetAddress can be used as a client address.public Function<? super ProxiedAddresses,? extends InetSocketAddress> clientAddressMapper()
Function to use when determining the client address from ProxiedAddresses.public boolean isServerHeaderEnabled()
"Server" header.public boolean isDateHeaderEnabled()
"Date" header.Copyright © 2020 LeanCloud. All rights reserved.