Package | Description |
---|---|
io.vertx.core |
= Vert.x Core Manual
:toc: left
At the heart of Vert.x is a set of Java APIs that we call *Vert.x Core*
https://github.com/eclipse/vert.x[Repository].
|
io.vertx.core.http |
== Writing HTTP servers and clients
Vert.x allows you to easily write non blocking HTTP clients and servers.
|
io.vertx.core.spi.metrics |
Modifier and Type | Method and Description |
---|---|
HttpServer |
Vertx.createHttpServer(HttpServerOptions options)
Create an HTTP/HTTPS server using the specified options
|
Modifier and Type | Method and Description |
---|---|
HttpServerOptions |
HttpServerOptions.addCrlPath(String crlPath) |
HttpServerOptions |
HttpServerOptions.addCrlValue(Buffer crlValue) |
HttpServerOptions |
HttpServerOptions.addEnabledCipherSuite(String suite) |
HttpServerOptions |
HttpServerOptions.addEnabledSecureTransportProtocol(String protocol) |
HttpServerOptions |
HttpServerOptions.setAcceptBacklog(int acceptBacklog) |
HttpServerOptions |
HttpServerOptions.setAcceptUnmaskedFrames(boolean acceptUnmaskedFrames)
Set true when the server accepts unmasked frame.
|
HttpServerOptions |
HttpServerOptions.setAlpnVersions(List<HttpVersion> alpnVersions)
Set the list of protocol versions to provide to the server during the Application-Layer Protocol Negotiatiation.
|
HttpServerOptions |
HttpServerOptions.setClientAuth(ClientAuth clientAuth) |
HttpServerOptions |
HttpServerOptions.setClientAuthRequired(boolean clientAuthRequired)
Deprecated.
|
HttpServerOptions |
HttpServerOptions.setCompressionLevel(int compressionLevel)
This method allows to set the compression level to be used in http1.x/2 response bodies
when compression support is turned on (@see setCompressionSupported) and the client advertises
to support
deflate/gzip compression in the Accept-Encoding header
default value is : 6 (Netty legacy)
The compression level determines how much the data is compressed on a scale from 1 to 9,
where '9' is trying to achieve the maximum compression ratio while '1' instead is giving
priority to speed instead of compression ratio using some algorithm optimizations and skipping
pedantic loops that usually gives just little improvements
While one can think that best value is always the maximum compression ratio,
there's a trade-off to consider: the most compressed level requires the most
computational work to compress/decompress data, e.g. |
HttpServerOptions |
HttpServerOptions.setCompressionSupported(boolean compressionSupported)
Set whether the server should support gzip/deflate compression
(serving compressed responses to clients advertising support for them with Accept-Encoding header)
|
HttpServerOptions |
HttpServerOptions.setDecoderInitialBufferSize(int decoderInitialBufferSize)
Set the initial buffer size for the HTTP decoder
|
HttpServerOptions |
HttpServerOptions.setDecompressionSupported(boolean decompressionSupported)
Set whether the server supports decompression
|
HttpServerOptions |
HttpServerOptions.setHandle100ContinueAutomatically(boolean handle100ContinueAutomatically)
Set whether 100 Continue should be handled automatically
|
HttpServerOptions |
HttpServerOptions.setHost(String host) |
HttpServerOptions |
HttpServerOptions.setHttp2ConnectionWindowSize(int http2ConnectionWindowSize)
Set the default HTTP/2 connection window size.
|
HttpServerOptions |
HttpServerOptions.setIdleTimeout(int idleTimeout) |
HttpServerOptions |
HttpServerOptions.setInitialSettings(Http2Settings settings)
Set the HTTP/2 connection settings immediatly sent by the server when a client connects.
|
HttpServerOptions |
HttpServerOptions.setJdkSslEngineOptions(JdkSSLEngineOptions sslEngineOptions) |
HttpServerOptions |
HttpServerOptions.setKeyCertOptions(KeyCertOptions options) |
HttpServerOptions |
HttpServerOptions.setKeyStoreOptions(JksOptions options) |
HttpServerOptions |
HttpServerOptions.setLogActivity(boolean logEnabled) |
HttpServerOptions |
HttpServerOptions.setMaxChunkSize(int maxChunkSize)
Set the maximum HTTP chunk size
|
HttpServerOptions |
HttpServerOptions.setMaxHeaderSize(int maxHeaderSize)
Set the maximum length of all headers for HTTP/1.x .
|
HttpServerOptions |
HttpServerOptions.setMaxInitialLineLength(int maxInitialLineLength)
Set the maximum length of the initial line for HTTP/1.x (e.g.
|
HttpServerOptions |
HttpServerOptions.setMaxWebsocketFrameSize(int maxWebsocketFrameSize)
Set the maximum websocket frames size
|
HttpServerOptions |
HttpServerOptions.setMaxWebsocketMessageSize(int maxWebsocketMessageSize)
Set the maximum websocket message size
|
HttpServerOptions |
HttpServerOptions.setOpenSslEngineOptions(OpenSSLEngineOptions sslEngineOptions) |
HttpServerOptions |
HttpServerOptions.setPemKeyCertOptions(PemKeyCertOptions options) |
HttpServerOptions |
HttpServerOptions.setPemTrustOptions(PemTrustOptions options) |
HttpServerOptions |
HttpServerOptions.setPfxKeyCertOptions(PfxOptions options) |
HttpServerOptions |
HttpServerOptions.setPfxTrustOptions(PfxOptions options) |
HttpServerOptions |
HttpServerOptions.setPort(int port) |
HttpServerOptions |
HttpServerOptions.setReceiveBufferSize(int receiveBufferSize) |
HttpServerOptions |
HttpServerOptions.setReuseAddress(boolean reuseAddress) |
HttpServerOptions |
HttpServerOptions.setReusePort(boolean reusePort) |
HttpServerOptions |
HttpServerOptions.setSendBufferSize(int sendBufferSize) |
HttpServerOptions |
HttpServerOptions.setSni(boolean sni) |
HttpServerOptions |
HttpServerOptions.setSoLinger(int soLinger) |
HttpServerOptions |
HttpServerOptions.setSsl(boolean ssl) |
HttpServerOptions |
HttpServerOptions.setSslEngineOptions(SSLEngineOptions sslEngineOptions) |
HttpServerOptions |
HttpServerOptions.setTcpCork(boolean tcpCork) |
HttpServerOptions |
HttpServerOptions.setTcpFastOpen(boolean tcpFastOpen) |
HttpServerOptions |
HttpServerOptions.setTcpKeepAlive(boolean tcpKeepAlive) |
HttpServerOptions |
HttpServerOptions.setTcpNoDelay(boolean tcpNoDelay) |
HttpServerOptions |
HttpServerOptions.setTcpQuickAck(boolean tcpQuickAck) |
HttpServerOptions |
HttpServerOptions.setTrafficClass(int trafficClass) |
HttpServerOptions |
HttpServerOptions.setTrustOptions(TrustOptions options) |
HttpServerOptions |
HttpServerOptions.setTrustStoreOptions(JksOptions options) |
HttpServerOptions |
HttpServerOptions.setUseAlpn(boolean useAlpn) |
HttpServerOptions |
HttpServerOptions.setUsePooledBuffers(boolean usePooledBuffers) |
HttpServerOptions |
HttpServerOptions.setWebsocketSubProtocols(String subProtocols)
Set the websocket subprotocols supported by the server.
|
Constructor and Description |
---|
HttpServerOptions(HttpServerOptions other)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
HttpServerMetrics<?,?,?> |
VertxMetrics.createMetrics(HttpServer server,
SocketAddress localAddress,
HttpServerOptions options)
Provides the http server metrics SPI when an http server is created.
|
Copyright © 2017. All rights reserved.