Package | Description |
---|---|
bayou.http |
Http server.
|
Modifier and Type | Method and Description |
---|---|
HttpServerConf |
HttpServerConf.accessLogger(Consumer<HttpAccess> accessLogger)
Http Access Logger.
|
HttpServerConf |
HttpServerConf.accessLogTo(Consumer<CharSequence> out)
Set the
accessLogger as one that writes entries to `out`. |
HttpServerConf |
HttpServerConf.autoCacheControl(boolean autoCacheControl)
Whether to set response header "Cache-Control" automatically.
|
HttpServerConf |
HttpServerConf.autoConditional(boolean autoConditional)
Whether to handle conditional requests automatically.
|
HttpServerConf |
HttpServerConf.autoGzip(boolean autoGzip)
Whether to compress responses with "gzip" automatically.
|
HttpServerConf |
HttpServerConf.autoGzipContentTypes(String... contentTypes)
Content types of responses to allow auto gzip.
|
HttpServerConf |
HttpServerConf.autoGzipMinContentLength(long autoGzipMinContentLength)
Min content length of responses to allow auto gzip.
|
HttpServerConf |
HttpServerConf.autoRange(boolean autoRange)
Whether to handle Range requests automatically.
|
HttpServerConf |
HttpServerConf.closeTimeout(Duration closeTimeout)
Timeout for closing a connection.
|
HttpServerConf |
HttpServer.conf()
Get the
HttpServerConf of this server. |
HttpServerConf |
HttpServerConf.drainRequestTimeout(Duration drainRequestTimeout)
Timeout for draining the request body before writing a response.
|
HttpServerConf |
HttpServerConf.ip(InetAddress ip)
IP address the server socket binds to.
|
HttpServerConf |
HttpServerConf.ip(String ip)
IP address the server socket binds to.
|
HttpServerConf |
HttpServerConf.keepAliveTimeout(Duration keepAliveTimeout)
Timeout for keep-alive connections.
|
HttpServerConf |
HttpServerConf.maxConnections(int maxConnections)
Max number of connections.
|
HttpServerConf |
HttpServerConf.maxConnectionsPerIp(int maxConnectionsPerIp)
Max number of connections per IP.
|
HttpServerConf |
HttpServerConf.outboundBufferSize(long outboundBufferSize)
Outbound buffer size.
|
HttpServerConf |
HttpServerConf.port(int... ports)
Ports for plain connections.
|
HttpServerConf |
HttpServerConf.readMinThroughput(long readMinThroughput)
Min throughput (bytes/second) when reading a request body.
|
HttpServerConf |
HttpServerConf.readTimeout(Duration readTimeout)
Timeout for read() when reading a request body.
|
HttpServerConf |
HttpServerConf.requestBodyMaxLength(long requestBodyMaxLength)
Max length of a request body.
|
HttpServerConf |
HttpServerConf.requestEncodingPolicy(String requestEncodingPolicy)
How to handle request entity Content-Encoding.
|
HttpServerConf |
HttpServerConf.requestHeadFieldMaxLength(int requestHeadFieldMaxLength)
Max length for request uri and any header value in a request.
|
HttpServerConf |
HttpServerConf.requestHeadTimeout(Duration requestHeadTimeout)
Timeout for reading a request head.
|
HttpServerConf |
HttpServerConf.requestHeadTotalMaxLength(int requestHeadTotalMaxLength)
Max length of a request head.
|
HttpServerConf |
HttpServerConf.selectorIds(int... selectorIds)
Ids of selectors for this server.
|
HttpServerConf |
HttpServerConf.serverSocketBacklog(int serverSocketBacklog)
Server socket backlog.
|
HttpServerConf |
HttpServerConf.serverSocketConf(ConsumerX<ServerSocketChannel> action)
Action to configure the server socket.
|
HttpServerConf |
HttpServerConf.setProxyDefaults()
Set default values suitable for a proxy.
|
HttpServerConf |
HttpServerConf.socketConf(ConsumerX<SocketChannel> action)
Action to configure each newly accepted socket.
|
HttpServerConf |
HttpServerConf.sslContext(SSLContext sslContext)
SSLContext for SSL connections.
|
HttpServerConf |
HttpServerConf.sslEngineConf(ConsumerX<SSLEngine> action)
Action to configure each SSLEngine.
|
HttpServerConf |
HttpServerConf.sslHandshakeTimeout(Duration sslHandshakeTimeout)
Timeout for completing the SSL handshake on an SSL connection.
|
HttpServerConf |
HttpServerConf.sslKeyStore(String filePath,
String password)
Set
sslContext using a key store file. |
HttpServerConf |
HttpServerConf.sslPort(int... ports)
SSL port numbers.
|
HttpServerConf |
HttpServerConf.supportedMethods(String... methods)
HTTP methods supported by the server.
|
HttpServerConf |
HttpServerConf.trafficDump(Consumer<CharSequence> trafficDump)
Where to dump http traffic, for debugging purpose.
|
HttpServerConf |
HttpServerConf.writeMinThroughput(long writeMinThroughput)
Min throughput (bytes/second) when writing a response.
|
HttpServerConf |
HttpServerConf.writeTimeout(Duration writeTimeout)
Timeout for write() when writing a response.
|
HttpServerConf |
HttpServerConf.xForwardLevel(int xForwardLevel)
Expected level of
"X-Forwarded-For" . |
Modifier and Type | Method and Description |
---|---|
void |
HttpUpgrader.init(HttpServerConf httpServerConf)
Initialize this upgrader.
|
Constructor and Description |
---|
HttpServer(HttpServerConf conf,
HttpHandler handler)
Create an HttpServer.
|