public class ServerConfig extends Object
ServerConfig
loads configurations from a specified property file and falls back to default
value when the file is missing or not found.
Server Configurable values:
Port
- This is the port that the HTTP server is listening on to accept new connections.
Max request size
- maximum length of aggregated content in HTTP request
Boss group size
- number of threads used by boss NioEventLoopGroup
which only accepts
incoming connection and registers the connection to the worker.
Backlog size
- the maximum queue length for incoming connection indications(a request to connect)
TCP nodelay
- option to disable Nagle's algorithm to achieve lower latency on every packet sent
Keep alive
- option to enable keep-alive packets for a socket connectionModifier and Type | Class and Description |
---|---|
static class |
ServerConfig.ServerConfigBuilder
Builder class builds server configuration from property file.
|
Modifier and Type | Field and Description |
---|---|
int |
backlogSize |
int |
bossGroupSize |
boolean |
keepAlive |
int |
maxRequestSize |
int |
port |
boolean |
tcpNodelay |
Copyright © 2017. All rights reserved.