# Cheatsheets

## NetworkOptions

@author Tim Fox

Name | Type | Description
`receiveBufferSize` | `Number (int)` | Set the TCP receive buffer size
`reuseAddress` | `Boolean` | Set the value of reuse address
`sendBufferSize` | `Number (int)` | Set the TCP send buffer size
`trafficClass` | `Number (int)` | Set the value of traffic class

## DeliveryOptions

Delivery options are used to configure message delivery.

Delivery options allow to configure delivery timeout and message codec name, and to provide any headers that you wish to send with the message.

Name | Type | Description
`codecName` | `String` | Set the codec name.
`sendTimeout` | `Number (long)` | Set the send timeout.

## OpenOptions

Describes how an link should be opened.

Name | Type | Description
`create` | `Boolean` | Set whether the file should be created if it does not already exist.
`createNew` | `Boolean` | Set whether the file should be created and fail if it does exist already.
`deleteOnClose` | `Boolean` | Set whether the file should be deleted when it's closed, or the JVM is shutdown.
`dsync` | `Boolean` | Set whether every write to the file's content ill be written synchronously to the underlying hardware.
`perms` | `String` | Set the permissions string
`read` | `Boolean` | Set whether the file is to be opened for reading
`sparse` | `Boolean` | Set whether a hint should be provided that the file to created is sparse
`sync` | `Boolean` | Set whether every write to the file's content and meta-data will be written synchronously to the underlying hardware.
`truncateExisting` | `Boolean` | Set whether the file should be truncated to zero length on opening if it exists and is opened for write
`write` | `Boolean` | Set whether the file is to be opened for writing

## JksOptions

Key or trust store options configuring private key and/or certificates based on Java Keystore files.

When used as a key store, it should point to a store containing a private key and its certificate. When used as a trust store, it should point to a store containing a list of trusted certificates.

The store can either be loaded by Vert.x from the filesystem:

     HttpServerOptions options = HttpServerOptions.httpServerOptions();
     options.setKeyStore(JKSOptions.options().setPath("/mykeystore.jks").setPassword("foo"));

Or directly provided as a buffer:

     Buffer store = vertx.fileSystem().readFileSync("/mykeystore.jks");
     options.setKeyStore(JKSOptions.options().setValue(store).setPassword("foo"));

Name | Type | Description
`password` | `String` | Set the password for the key store
`path` | `String` | Set the path to the key store
`value` | `Buffer` | Set the key store as a buffer

## VertxOptions

Instances of this class are used to configure link instances.

Name | Type | Description
`blockedThreadCheckInterval` | `Number (long)` | Sets the value of blocked thread check period, in ms.
`clusterHost` | `String` | Set the hostname to be used for clustering.
`clusterPingInterval` | `Number (long)` | Set the value of cluster ping interval, in ms.
`clusterPingReplyInterval` | `Number (long)` | Set the value of cluster ping reply interval, in ms.
`clusterPort` | `Number (int)` | Set the port to be used for clustering.
`clusterPublicHost` | `String` | Set the public facing hostname to be used for clustering. Sometimes, e.g. when running on certain clouds, the local address the server listens on for clustering is not the same address that other nodes connect to it at, as the OS / cloud infrastructure does some kind of proxying. If this is the case you can specify a public hostname which is different from the hostname the server listens at. The default value is null which means use the same as the cluster hostname.
`clusterPublicPort` | `Number (int)` | See link for an explanation.
`clustered` | `Boolean` | Set whether or not the Vert.x instance will be clustered.
`eventLoopPoolSize` | `Number (int)` | Set the number of event loop threads to be used by the Vert.x instance.
`haEnabled` | `Boolean` | Set whether HA will be enabled on the Vert.x instance.
`haGroup` | `String` | Set the HA group to be used when HA is enabled.
`internalBlockingPoolSize` | `Number (int)` | Set the value of internal blocking pool size
`maxEventLoopExecuteTime` | `Number (long)` | Sets the value of max event loop execute time, in ns.
`maxWorkerExecuteTime` | `Number (long)` | Sets the value of max worker execute time, in ns.
`metricsOptions` | `MetricsOptions` | Set the metrics options
`quorumSize` | `Number (int)` | Set the quorum size to be used when HA is enabled.
`warningExceptionTime` | `Number (long)` | Set the threshold value above this, the blocked warning contains a stack trace.
`workerPoolSize` | `Number (int)` | Set the maximum number of worker threads to be used by the Vert.x instance.

## Argument

Defines a command line argument. Unlike options, argument don't have names and are identified using an index. The first index is 0 (because we are in the computer world).

Name | Type | Description
`argName` | `String` | Sets the argument name of this link.
`defaultValue` | `String` | Sets the default value of this link.
`description` | `String` | Sets the description of the link.
`hidden` | `Boolean` | Sets whether or not the current link is hidden.
`index` | `Number (int)` | Sets the argument index.
`required` | `Boolean` | Sets whether or not the current link is required.

## PfxOptions

Key or trust store options configuring private key and/or certificates based on PKCS#12 files.

When used as a key store, it should point to a store containing a private key and its certificate. When used as a trust store, it should point to a store containing a list of accepted certificates.

The store can either be loaded by Vert.x from the filesystem:

     HttpServerOptions options = new HttpServerOptions();
     options.setPfxKeyCertOptions(new PfxOptions().setPath("/mykeystore.p12").setPassword("foo"));

Or directly provided as a buffer:

     Buffer store = vertx.fileSystem().readFileSync("/mykeystore.p12");
     options.setPfxKeyCertOptions(new PfxOptions().setValue(store).setPassword("foo"));

Name | Type | Description
`password` | `String` | Set the password
`path` | `String` | Set the path
`value` | `Buffer` | Set the store as a buffer

## NetClientOptions

Options for configuring a link.

Name | Type | Description
`connectTimeout` | `Number (int)` | Set the connect timeout
`crlPaths` | `Array of String` | Add a CRL path
`crlValues` | `Array of Buffer` | Add a CRL value
`enabledCipherSuites` | `Array of String` | Add an enabled cipher suite
`idleTimeout` | `Number (int)` | Set the idle timeout, in seconds. zero means don't timeout. This determines if a connection will timeout and be closed if no data is received within the timeout.
`keyStoreOptions` | `JksOptions` | Set the key/cert options in jks format, aka Java keystore.
`pemKeyCertOptions` | `PemKeyCertOptions` | Set the key/cert store options in pem format.
`pemTrustOptions` | `PemTrustOptions` | Set the trust options in pem format
`pfxKeyCertOptions` | `PfxOptions` | Set the key/cert options in pfx format.
`pfxTrustOptions` | `PfxOptions` | Set the trust options in pfx format
`receiveBufferSize` | `Number (int)` | Set the TCP receive buffer size
`reconnectAttempts` | `Number (int)` | Set the value of reconnect attempts
`reconnectInterval` | `Number (long)` | Set the reconnect interval
`reuseAddress` | `Boolean` | Set the value of reuse address
`sendBufferSize` | `Number (int)` | Set the TCP send buffer size
`soLinger` | `Number (int)` | Set whether SO_linger keep alive is enabled
`ssl` | `Boolean` | Set whether SSL/TLS is enabled
`tcpKeepAlive` | `Boolean` | Set whether TCP keep alive is enabled
`tcpNoDelay` | `Boolean` | Set whether TCP no delay is enabled
`trafficClass` | `Number (int)` | Set the value of traffic class
`trustAll` | `Boolean` | Set whether all server certificates should be trusted
`trustStoreOptions` | `JksOptions` | Set the trust options in jks format, aka Java trustore
`usePooledBuffers` | `Boolean` | Set whether Netty pooled buffers are enabled

## TrustOptions

Certification authority configuration options.

Name | Type | Description

## Option

Models command line options. Options are values passed to a command line interface using -x or --x. Supported syntaxes depend on the parser.

Short name is generally used with a single dash, while long name requires a double-dash.

Name | Type | Description
`argName` | `String` | Sets te arg name for this option.
`defaultValue` | `String` | Sets the default value of this option
`description` | `String` | Sets te description of this option.
`flag` | `Boolean` | Configures the current link to be a flag. It will be evaluated to `true` if it's found in the command line. If you need a flag that may receive a value, use, in this order: ``
       option.setFlag(true).setSingleValued(true)
`hidden` | `Boolean` | Sets whether or not this option should be hidden
`longName` | `String` | Sets the long name of this option.
`multiValued` | `Boolean` | Sets whether or not this option can receive several values.
`required` | `Boolean` | Sets whether or not this option is mandatory.
`shortName` | `String` | Sets the short name of this option.
`singleValued` | `Boolean` | Sets whether or not this option can receive a value.

## NetServerOptions

Options for configuring a link.

Name | Type | Description
`acceptBacklog` | `Number (int)` | Set the accept back log
`clientAuth` | `ClientAuth` | Set whether client auth is required
`clientAuthRequired` | `Boolean` | Set whether client auth is required
`crlPaths` | `Array of String` | Add a CRL path
`crlValues` | `Array of Buffer` | Add a CRL value
`enabledCipherSuites` | `Array of String` | Add an enabled cipher suite
`host` | `String` | Set the host
`idleTimeout` | `Number (int)` | Set the idle timeout, in seconds. zero means don't timeout. This determines if a connection will timeout and be closed if no data is received within the timeout.
`keyStoreOptions` | `JksOptions` | Set the key/cert options in jks format, aka Java keystore.
`pemKeyCertOptions` | `PemKeyCertOptions` | Set the key/cert store options in pem format.
`pemTrustOptions` | `PemTrustOptions` | Set the trust options in pem format
`pfxKeyCertOptions` | `PfxOptions` | Set the key/cert options in pfx format.
`pfxTrustOptions` | `PfxOptions` | Set the trust options in pfx format
`port` | `Number (int)` | Set the port
`receiveBufferSize` | `Number (int)` | Set the TCP receive buffer size
`reuseAddress` | `Boolean` | Set the value of reuse address
`sendBufferSize` | `Number (int)` | Set the TCP send buffer size
`soLinger` | `Number (int)` | Set whether SO_linger keep alive is enabled
`ssl` | `Boolean` | Set whether SSL/TLS is enabled
`tcpKeepAlive` | `Boolean` | Set whether TCP keep alive is enabled
`tcpNoDelay` | `Boolean` | Set whether TCP no delay is enabled
`trafficClass` | `Number (int)` | Set the value of traffic class
`trustStoreOptions` | `JksOptions` | Set the trust options in jks format, aka Java trustore
`usePooledBuffers` | `Boolean` | Set whether Netty pooled buffers are enabled

## ClientOptionsBase

Base class for Client options

Name | Type | Description
`connectTimeout` | `Number (int)` | Set the connect timeout
`crlPaths` | `Array of String` | Add a CRL path
`crlValues` | `Array of Buffer` | Add a CRL value
`enabledCipherSuites` | `Array of String` | Add an enabled cipher suite
`idleTimeout` | `Number (int)` | Set the idle timeout, in seconds. zero means don't timeout. This determines if a connection will timeout and be closed if no data is received within the timeout.
`keyStoreOptions` | `JksOptions` | Set the key/cert options in jks format, aka Java keystore.
`pemKeyCertOptions` | `PemKeyCertOptions` | Set the key/cert store options in pem format.
`pemTrustOptions` | `PemTrustOptions` | Set the trust options in pem format
`pfxKeyCertOptions` | `PfxOptions` | Set the key/cert options in pfx format.
`pfxTrustOptions` | `PfxOptions` | Set the trust options in pfx format
`receiveBufferSize` | `Number (int)` | Set the TCP receive buffer size
`reuseAddress` | `Boolean` | Set the value of reuse address
`sendBufferSize` | `Number (int)` | Set the TCP send buffer size
`soLinger` | `Number (int)` | Set whether SO_linger keep alive is enabled
`ssl` | `Boolean` | Set whether SSL/TLS is enabled
`tcpKeepAlive` | `Boolean` | Set whether TCP keep alive is enabled
`tcpNoDelay` | `Boolean` | Set whether TCP no delay is enabled
`trafficClass` | `Number (int)` | Set the value of traffic class
`trustAll` | `Boolean` | Set whether all server certificates should be trusted
`trustStoreOptions` | `JksOptions` | Set the trust options in jks format, aka Java trustore
`usePooledBuffers` | `Boolean` | Set whether Netty pooled buffers are enabled

## MetricsOptions

Vert.x metrics base configuration, this class can be extended by provider implementations to configure those specific implementations.

Name | Type | Description
`enabled` | `Boolean` | Set whether metrics will be enabled on the Vert.x instance.

## DeploymentOptions

Options for configuring a verticle deployment.

Name | Type | Description
`config` | `Json object` | Set the JSON configuration that will be passed to the verticle(s) when it's deployed
`extraClasspath` | `Array of String` | Set any extra classpath to be used when deploying the verticle. Ignored if no isolation group is set.
`ha` | `Boolean` | Set whether the verticle(s) will be deployed as HA.
`instances` | `Number (int)` | Set the number of instances that should be deployed.
`isolatedClasses` | `Array of String` | Set the isolated class names.
`isolationGroup` | `String` | Set the isolation group that will be used when deploying the verticle(s)
`multiThreaded` | `Boolean` | Set whether the verticle(s) should be deployed as a multi-threaded worker verticle
`worker` | `Boolean` | Set whether the verticle(s) should be deployed as a worker verticle

## KeyCertOptions

Key/cert configuration options.

Name | Type | Description

## PemKeyCertOptions

Key store options configuring a private key and its certificate based on Privacy-enhanced Electronic Email (PEM) files.

The key file must contain a non encrypted private key in PKCS8 format wrapped in a PEM block, for example:

     -----BEGIN PRIVATE KEY-----
     MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDV6zPk5WqLwS0a
     ...
     K5xBhtm1AhdnZjx5KfW3BecE
     -----END PRIVATE KEY-----

The certificate file must contain an X.509 certificate wrapped in a PEM block, for example:

     -----BEGIN CERTIFICATE-----
     MIIDezCCAmOgAwIBAgIEZOI/3TANBgkqhkiG9w0BAQsFADBuMRAwDgYDVQQGEwdV
     ...
     +tmLSvYS39O2nqIzzAUfztkYnUlZmB0l/mKkVqbGJA==
     -----END CERTIFICATE-----

The key and certificate can either be loaded by Vert.x from the filesystem:

     HttpServerOptions options = new HttpServerOptions();
     options.setPemKeyCertOptions(new PemKeyCertOptions().setKeyPath("/mykey.pem").setCertPath("/mycert.pem"));

Or directly provided as a buffer:

     Buffer key = vertx.fileSystem().readFileSync("/mykey.pem");
     Buffer cert = vertx.fileSystem().readFileSync("/mycert.pem");
     options.setPemKeyCertOptions(new PemKeyCertOptions().setKeyValue(key).setCertValue(cert));

Name | Type | Description
`certPath` | `String` | Set the path to the certificate
`certValue` | `Buffer` | Set the certificate as a buffer
`keyPath` | `String` | Set the path to the key file
`keyValue` | `Buffer` | Set the key a a buffer

## HttpServerOptions

Represents options used by an link instance

Name | Type | Description
`acceptBacklog` | `Number (int)` | Set the accept back log
`clientAuth` | `ClientAuth` | Set whether client auth is required
`clientAuthRequired` | `Boolean` | Set whether client auth is required
`compressionSupported` | `Boolean` | Set whether the server supports compression
`crlPaths` | `Array of String` | Add a CRL path
`crlValues` | `Array of Buffer` | Add a CRL value
`enabledCipherSuites` | `Array of String` | Add an enabled cipher suite
`handle100ContinueAutomatically` | `Boolean` | Set whether 100 Continue should be handled automatically
`host` | `String` | Set the host
`idleTimeout` | `Number (int)` | Set the idle timeout, in seconds. zero means don't timeout. This determines if a connection will timeout and be closed if no data is received within the timeout.
`keyStoreOptions` | `JksOptions` | Set the key/cert options in jks format, aka Java keystore.
`maxWebsocketFrameSize` | `Number (int)` | Set the maximum websocket frames size
`pemKeyCertOptions` | `PemKeyCertOptions` | Set the key/cert store options in pem format.
`pemTrustOptions` | `PemTrustOptions` | Set the trust options in pem format
`pfxKeyCertOptions` | `PfxOptions` | Set the key/cert options in pfx format.
`pfxTrustOptions` | `PfxOptions` | Set the trust options in pfx format
`port` | `Number (int)` | Set the port
`receiveBufferSize` | `Number (int)` | Set the TCP receive buffer size
`reuseAddress` | `Boolean` | Set the value of reuse address
`sendBufferSize` | `Number (int)` | Set the TCP send buffer size
`soLinger` | `Number (int)` | Set whether SO_linger keep alive is enabled
`ssl` | `Boolean` | Set whether SSL/TLS is enabled
`tcpKeepAlive` | `Boolean` | Set whether TCP keep alive is enabled
`tcpNoDelay` | `Boolean` | Set whether TCP no delay is enabled
`trafficClass` | `Number (int)` | Set the value of traffic class
`trustStoreOptions` | `JksOptions` | Set the trust options in jks format, aka Java trustore
`usePooledBuffers` | `Boolean` | Set whether Netty pooled buffers are enabled
`websocketSubProtocols` | `String` | Set the websocket subprotocols supported by the server.

## HttpClientOptions

Options describing how an link will make connections.

Name | Type | Description
`connectTimeout` | `Number (int)` | Set the connect timeout
`crlPaths` | `Array of String` | Add a CRL path
`crlValues` | `Array of Buffer` | Add a CRL value
`defaultHost` | `String` | Set the default host name to be used by this client in requests if none is provided when making the request.
`defaultPort` | `Number (int)` | Set the default port to be used by this client in requests if none is provided when making the request.
`enabledCipherSuites` | `Array of String` | Add an enabled cipher suite
`idleTimeout` | `Number (int)` | Set the idle timeout, in seconds. zero means don't timeout. This determines if a connection will timeout and be closed if no data is received within the timeout.
`keepAlive` | `Boolean` | Set whether keep alive is enabled on the client
`keyStoreOptions` | `JksOptions` | Set the key/cert options in jks format, aka Java keystore.
`maxPoolSize` | `Number (int)` | Set the maximum pool size for connections
`maxWebsocketFrameSize` | `Number (int)` | Set the max websocket frame size
`pemKeyCertOptions` | `PemKeyCertOptions` | Set the key/cert store options in pem format.
`pemTrustOptions` | `PemTrustOptions` | Set the trust options in pem format
`pfxKeyCertOptions` | `PfxOptions` | Set the key/cert options in pfx format.
`pfxTrustOptions` | `PfxOptions` | Set the trust options in pfx format
`pipelining` | `Boolean` | Set whether pipe-lining is enabled on the client
`protocolVersion` | `HttpVersion` | Set the protocol version.
`receiveBufferSize` | `Number (int)` | Set the TCP receive buffer size
`reuseAddress` | `Boolean` | Set the value of reuse address
`sendBufferSize` | `Number (int)` | Set the TCP send buffer size
`soLinger` | `Number (int)` | Set whether SO_linger keep alive is enabled
`ssl` | `Boolean` | Set whether SSL/TLS is enabled
`tcpKeepAlive` | `Boolean` | Set whether TCP keep alive is enabled
`tcpNoDelay` | `Boolean` | Set whether TCP no delay is enabled
`trafficClass` | `Number (int)` | Set the value of traffic class
`trustAll` | `Boolean` | Set whether all server certificates should be trusted
`trustStoreOptions` | `JksOptions` | Set the trust options in jks format, aka Java trustore
`tryUseCompression` | `Boolean` | Set whether compression is enabled
`usePooledBuffers` | `Boolean` | Set whether Netty pooled buffers are enabled
`verifyHost` | `Boolean` | Set whether hostname verification is enabled

## DatagramSocketOptions

Options used to configure a datagram socket.

Name | Type | Description
`broadcast` | `Boolean` | Set if the socket can receive broadcast packets
`ipV6` | `Boolean` | Set if IP v6 should be used
`loopbackModeDisabled` | `Boolean` | Set if loopback mode is disabled
`multicastNetworkInterface` | `String` | Set the multicast network interface address
`multicastTimeToLive` | `Number (int)` | Set the multicast ttl value
`receiveBufferSize` | `Number (int)` | Set the TCP receive buffer size
`reuseAddress` | `Boolean` | Set the value of reuse address
`sendBufferSize` | `Number (int)` | Set the TCP send buffer size
`trafficClass` | `Number (int)` | Set the value of traffic class

## PemTrustOptions

Certificate Authority options configuring certificates based on Privacy-enhanced Electronic Email (PEM) files. The options is configured with a list of validating certificates.

Validating certificates must contain X.509 certificates wrapped in a PEM block:

     -----BEGIN CERTIFICATE-----
     MIIDezCCAmOgAwIBAgIEVmLkwTANBgkqhkiG9w0BAQsFADBuMRAwDgYDVQQGEwdV
     ...
     z5+DuODBJUQst141Jmgq8bS543IU/5apcKQeGNxEyQ==
     -----END CERTIFICATE-----

The certificates can either be loaded by Vert.x from the filesystem:

     HttpServerOptions options = new HttpServerOptions();
     options.setPemTrustOptions(new PemTrustOptions().addCertPath("/cert.pem"));

Or directly provided as a buffer:

     Buffer cert = vertx.fileSystem().readFileSync("/cert.pem");
     HttpServerOptions options = new HttpServerOptions();
     options.setPemTrustOptions(new PemTrustOptions().addCertValue(cert));

Name | Type | Description
`certPaths` | `Array of String` | Add a certificate path
`certValues` | `Array of Buffer` | Add a certificate value

## TCPSSLOptions

Base class. TCP and SSL related options

Name | Type | Description
`crlPaths` | `Array of String` | Add a CRL path
`crlValues` | `Array of Buffer` | Add a CRL value
`enabledCipherSuites` | `Array of String` | Add an enabled cipher suite
`idleTimeout` | `Number (int)` | Set the idle timeout, in seconds. zero means don't timeout. This determines if a connection will timeout and be closed if no data is received within the timeout.
`keyStoreOptions` | `JksOptions` | Set the key/cert options in jks format, aka Java keystore.
`pemKeyCertOptions` | `PemKeyCertOptions` | Set the key/cert store options in pem format.
`pemTrustOptions` | `PemTrustOptions` | Set the trust options in pem format
`pfxKeyCertOptions` | `PfxOptions` | Set the key/cert options in pfx format.
`pfxTrustOptions` | `PfxOptions` | Set the trust options in pfx format
`receiveBufferSize` | `Number (int)` | Set the TCP receive buffer size
`reuseAddress` | `Boolean` | Set the value of reuse address
`sendBufferSize` | `Number (int)` | Set the TCP send buffer size
`soLinger` | `Number (int)` | Set whether SO_linger keep alive is enabled
`ssl` | `Boolean` | Set whether SSL/TLS is enabled
`tcpKeepAlive` | `Boolean` | Set whether TCP keep alive is enabled
`tcpNoDelay` | `Boolean` | Set whether TCP no delay is enabled
`trafficClass` | `Number (int)` | Set the value of traffic class
`trustStoreOptions` | `JksOptions` | Set the trust options in jks format, aka Java trustore
`usePooledBuffers` | `Boolean` | Set whether Netty pooled buffers are enabled