io.vertx.core.http

## Class HttpServerOptions

- java.lang.Object
- - io.vertx.core.net.NetworkOptions
  - - io.vertx.core.net.TCPSSLOptions
    - - io.vertx.core.net.NetServerOptions
      - - io.vertx.core.http.HttpServerOptions

-     public class HttpServerOptions
      extends NetServerOptions

  Represents options used by an `HttpServer` instance
  Author:
    Tim Fox

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static boolean` | `DEFAULT_COMPRESSION_SUPPORTED` Default value of whether compression is supported = false
    `static int` | `DEFAULT_MAX_WEBSOCKET_FRAME_SIZE` Default max websocket framesize = 65536
    `static int` | `DEFAULT_PORT` Default port the server will listen on = 80

    - ### Fields inherited from class io.vertx.core.net.NetServerOptions

      `DEFAULT_ACCEPT_BACKLOG, DEFAULT_CLIENT_AUTH_REQUIRED, DEFAULT_HOST`

    - ### Fields inherited from class io.vertx.core.net.TCPSSLOptions

      `DEFAULT_IDLE_TIMEOUT, DEFAULT_SO_LINGER, DEFAULT_SSL, DEFAULT_TCP_KEEP_ALIVE, DEFAULT_TCP_NO_DELAY, DEFAULT_USE_POOLED_BUFFERS`

    - ### Fields inherited from class io.vertx.core.net.NetworkOptions

      `DEFAULT_RECEIVE_BUFFER_SIZE, DEFAULT_REUSE_ADDRESS, DEFAULT_SEND_BUFFER_SIZE, DEFAULT_TRAFFIC_CLASS`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `HttpServerOptions()` Default constructor
    `HttpServerOptions(HttpServerOptions other)` Copy constructor
    `HttpServerOptions(JsonObject json)` Create an options from JSON

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `HttpServerOptions` | `addCrlPath(String crlPath)` Add a CRL path
    `HttpServerOptions` | `addCrlValue(Buffer crlValue)` Add a CRL value
    `HttpServerOptions` | `addEnabledCipherSuite(String suite)` Add an enabled cipher suite
    `boolean` | `equals(Object o)`
    `int` | `getMaxWebsocketFrameSize()`
    `String` | `getWebsocketSubProtocols()`
    `int` | `hashCode()`
    `boolean` | `isCompressionSupported()`
    `HttpServerOptions` | `setAcceptBacklog(int acceptBacklog)` Set the accept back log
    `HttpServerOptions` | `setClientAuthRequired(boolean clientAuthRequired)` Set whether client auth is required
    `HttpServerOptions` | `setCompressionSupported(boolean compressionSupported)` Set whether the server supports compression
    `HttpServerOptions` | `setHost(String host)` Set the host
    `HttpServerOptions` | `setIdleTimeout(int idleTimeout)` Set the idle timeout, in seconds.
    `HttpServerOptions` | `setKeyStoreOptions(JksOptions options)` Set the key/cert options in jks format, aka Java keystore.
    `HttpServerOptions` | `setMaxWebsocketFrameSize(int maxWebsocketFrameSize)` Set the maximum websocket frames size
    `HttpServerOptions` | `setPemKeyCertOptions(PemKeyCertOptions options)` Set the key/cert store options in pem format.
    `HttpServerOptions` | `setPemTrustOptions(PemTrustOptions options)` Set the trust options in pem format
    `HttpServerOptions` | `setPfxKeyCertOptions(PfxOptions options)` Set the key/cert options in pfx format.
    `HttpServerOptions` | `setPfxTrustOptions(PfxOptions options)` Set the trust options in pfx format
    `HttpServerOptions` | `setPort(int port)` Set the port
    `HttpServerOptions` | `setReceiveBufferSize(int receiveBufferSize)` Set the TCP receive buffer size
    `HttpServerOptions` | `setReuseAddress(boolean reuseAddress)` Set the value of reuse address
    `HttpServerOptions` | `setSendBufferSize(int sendBufferSize)` Set the TCP send buffer size
    `HttpServerOptions` | `setSoLinger(int soLinger)` Set whether SO_linger keep alive is enabled
    `HttpServerOptions` | `setSsl(boolean ssl)` Set whether SSL/TLS is enabled
    `HttpServerOptions` | `setTcpKeepAlive(boolean tcpKeepAlive)` Set whether TCP keep alive is enabled
    `HttpServerOptions` | `setTcpNoDelay(boolean tcpNoDelay)` Set whether TCP no delay is enabled
    `HttpServerOptions` | `setTrafficClass(int trafficClass)` Set the value of traffic class
    `HttpServerOptions` | `setTrustStoreOptions(JksOptions options)` Set the trust options in jks format, aka Java trustore
    `HttpServerOptions` | `setUsePooledBuffers(boolean usePooledBuffers)` Set whether Netty pooled buffers are enabled
    `HttpServerOptions` | `setWebsocketSubProtocol(String subProtocols)` Set the websocket subprotocols supported by the server.

    - ### Methods inherited from class io.vertx.core.net.NetServerOptions

      `getAcceptBacklog, getHost, getPort, isClientAuthRequired`

    - ### Methods inherited from class io.vertx.core.net.TCPSSLOptions

      `getCrlPaths, getCrlValues, getEnabledCipherSuites, getIdleTimeout, getKeyCertOptions, getSoLinger, getTrustOptions, isSsl, isTcpKeepAlive, isTcpNoDelay, isUsePooledBuffers`

    - ### Methods inherited from class io.vertx.core.net.NetworkOptions

      `getReceiveBufferSize, getSendBufferSize, getTrafficClass, isReuseAddress`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### DEFAULT_PORT

          public static final int DEFAULT_PORT

      Default port the server will listen on = 80
      See Also:
        Constant Field Values

    - #### DEFAULT_COMPRESSION_SUPPORTED

          public static final boolean DEFAULT_COMPRESSION_SUPPORTED

      Default value of whether compression is supported = false
      See Also:
        Constant Field Values

    - #### DEFAULT_MAX_WEBSOCKET_FRAME_SIZE

          public static final int DEFAULT_MAX_WEBSOCKET_FRAME_SIZE

      Default max websocket framesize = 65536
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### HttpServerOptions

          public HttpServerOptions()

      Default constructor

    - #### HttpServerOptions

          public HttpServerOptions(HttpServerOptions other)

      Copy constructor
      Parameters:
        `other` - the options to copy

    - #### HttpServerOptions

          public HttpServerOptions(JsonObject json)

      Create an options from JSON
      Parameters:
        `json` - the JSON

  - ### Method Detail

    - #### setSendBufferSize

          public HttpServerOptions setSendBufferSize(int sendBufferSize)

      Description copied from class: `NetworkOptions`
      Set the TCP send buffer size
      Overrides:
        `setSendBufferSize` in class `NetServerOptions`
      Parameters:
        `sendBufferSize` - the buffers size, in bytes
      Returns:
        a reference to this, so the API can be used fluently

    - #### setReceiveBufferSize

          public HttpServerOptions setReceiveBufferSize(int receiveBufferSize)

      Description copied from class: `NetworkOptions`
      Set the TCP receive buffer size
      Overrides:
        `setReceiveBufferSize` in class `NetServerOptions`
      Parameters:
        `receiveBufferSize` - the buffers size, in bytes
      Returns:
        a reference to this, so the API can be used fluently

    - #### setReuseAddress

          public HttpServerOptions setReuseAddress(boolean reuseAddress)

      Description copied from class: `NetworkOptions`
      Set the value of reuse address
      Overrides:
        `setReuseAddress` in class `NetServerOptions`
      Parameters:
        `reuseAddress` - the value of reuse address
      Returns:
        a reference to this, so the API can be used fluently

    - #### setTrafficClass

          public HttpServerOptions setTrafficClass(int trafficClass)

      Description copied from class: `NetworkOptions`
      Set the value of traffic class
      Overrides:
        `setTrafficClass` in class `NetServerOptions`
      Parameters:
        `trafficClass` - the value of traffic class
      Returns:
        a reference to this, so the API can be used fluently

    - #### setTcpNoDelay

          public HttpServerOptions setTcpNoDelay(boolean tcpNoDelay)

      Description copied from class: `TCPSSLOptions`
      Set whether TCP no delay is enabled
      Overrides:
        `setTcpNoDelay` in class `NetServerOptions`
      Parameters:
        `tcpNoDelay` - true if TCP no delay is enabled (Nagle disabled)
      Returns:
        a reference to this, so the API can be used fluently

    - #### setTcpKeepAlive

          public HttpServerOptions setTcpKeepAlive(boolean tcpKeepAlive)

      Description copied from class: `TCPSSLOptions`
      Set whether TCP keep alive is enabled
      Overrides:
        `setTcpKeepAlive` in class `NetServerOptions`
      Parameters:
        `tcpKeepAlive` - true if TCP keep alive is enabled
      Returns:
        a reference to this, so the API can be used fluently

    - #### setSoLinger

          public HttpServerOptions setSoLinger(int soLinger)

      Description copied from class: `TCPSSLOptions`
      Set whether SO_linger keep alive is enabled
      Overrides:
        `setSoLinger` in class `NetServerOptions`
      Parameters:
        `soLinger` - true if SO_linger is enabled
      Returns:
        a reference to this, so the API can be used fluently

    - #### setUsePooledBuffers

          public HttpServerOptions setUsePooledBuffers(boolean usePooledBuffers)

      Description copied from class: `TCPSSLOptions`
      Set whether Netty pooled buffers are enabled
      Overrides:
        `setUsePooledBuffers` in class `NetServerOptions`
      Parameters:
        `usePooledBuffers` - true if pooled buffers enabled
      Returns:
        a reference to this, so the API can be used fluently

    - #### setIdleTimeout

          public HttpServerOptions setIdleTimeout(int idleTimeout)

      Description copied from class: `TCPSSLOptions`
      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.
      Overrides:
        `setIdleTimeout` in class `NetServerOptions`
      Parameters:
        `idleTimeout` - the timeout, in seconds
      Returns:
        a reference to this, so the API can be used fluently

    - #### setSsl

          public HttpServerOptions setSsl(boolean ssl)

      Description copied from class: `TCPSSLOptions`
      Set whether SSL/TLS is enabled
      Overrides:
        `setSsl` in class `NetServerOptions`
      Parameters:
        `ssl` - true if enabled
      Returns:
        a reference to this, so the API can be used fluently

    - #### setKeyStoreOptions

          public HttpServerOptions setKeyStoreOptions(JksOptions options)

      Description copied from class: `TCPSSLOptions`
      Set the key/cert options in jks format, aka Java keystore.
      Overrides:
        `setKeyStoreOptions` in class `NetServerOptions`
      Parameters:
        `options` - the key store in jks format
      Returns:
        a reference to this, so the API can be used fluently

    - #### setPfxKeyCertOptions

          public HttpServerOptions setPfxKeyCertOptions(PfxOptions options)

      Description copied from class: `TCPSSLOptions`
      Set the key/cert options in pfx format.
      Overrides:
        `setPfxKeyCertOptions` in class `NetServerOptions`
      Parameters:
        `options` - the key cert options in pfx format
      Returns:
        a reference to this, so the API can be used fluently

    - #### setPemKeyCertOptions

          public HttpServerOptions setPemKeyCertOptions(PemKeyCertOptions options)

      Description copied from class: `TCPSSLOptions`
      Set the key/cert store options in pem format.
      Overrides:
        `setPemKeyCertOptions` in class `NetServerOptions`
      Parameters:
        `options` - the options in pem format
      Returns:
        a reference to this, so the API can be used fluently

    - #### setTrustStoreOptions

          public HttpServerOptions setTrustStoreOptions(JksOptions options)

      Description copied from class: `TCPSSLOptions`
      Set the trust options in jks format, aka Java trustore
      Overrides:
        `setTrustStoreOptions` in class `NetServerOptions`
      Parameters:
        `options` - the options in jks format
      Returns:
        a reference to this, so the API can be used fluently

    - #### setPemTrustOptions

          public HttpServerOptions setPemTrustOptions(PemTrustOptions options)

      Description copied from class: `TCPSSLOptions`
      Set the trust options in pem format
      Overrides:
        `setPemTrustOptions` in class `NetServerOptions`
      Parameters:
        `options` - the options in pem format
      Returns:
        a reference to this, so the API can be used fluently

    - #### setPfxTrustOptions

          public HttpServerOptions setPfxTrustOptions(PfxOptions options)

      Description copied from class: `TCPSSLOptions`
      Set the trust options in pfx format
      Overrides:
        `setPfxTrustOptions` in class `NetServerOptions`
      Parameters:
        `options` - the options in pfx format
      Returns:
        a reference to this, so the API can be used fluently

    - #### addEnabledCipherSuite

          public HttpServerOptions addEnabledCipherSuite(String suite)

      Description copied from class: `TCPSSLOptions`
      Add an enabled cipher suite
      Overrides:
        `addEnabledCipherSuite` in class `NetServerOptions`
      Parameters:
        `suite` - the suite
      Returns:
        a reference to this, so the API can be used fluently

    - #### addCrlPath

          public HttpServerOptions addCrlPath(String crlPath)
                                       throws NullPointerException

      Description copied from class: `TCPSSLOptions`
      Add a CRL path
      Overrides:
        `addCrlPath` in class `NetServerOptions`
      Parameters:
        `crlPath` - the path
      Returns:
        a reference to this, so the API can be used fluently
      Throws:
        `NullPointerException`

    - #### addCrlValue

          public HttpServerOptions addCrlValue(Buffer crlValue)
                                        throws NullPointerException

      Description copied from class: `TCPSSLOptions`
      Add a CRL value
      Overrides:
        `addCrlValue` in class `NetServerOptions`
      Parameters:
        `crlValue` - the value
      Returns:
        a reference to this, so the API can be used fluently
      Throws:
        `NullPointerException`

    - #### setAcceptBacklog

          public HttpServerOptions setAcceptBacklog(int acceptBacklog)

      Description copied from class: `NetServerOptions`
      Set the accept back log
      Overrides:
        `setAcceptBacklog` in class `NetServerOptions`
      Parameters:
        `acceptBacklog` - accept backlog
      Returns:
        a reference to this, so the API can be used fluently

    - #### setPort

          public HttpServerOptions setPort(int port)

      Description copied from class: `NetServerOptions`
      Set the port
      Overrides:
        `setPort` in class `NetServerOptions`
      Parameters:
        `port` - the port
      Returns:
        a reference to this, so the API can be used fluently

    - #### setHost

          public HttpServerOptions setHost(String host)

      Description copied from class: `NetServerOptions`
      Set the host
      Overrides:
        `setHost` in class `NetServerOptions`
      Parameters:
        `host` - the host
      Returns:
        a reference to this, so the API can be used fluently

    - #### isCompressionSupported

          public boolean isCompressionSupported()

      Returns:
        true if the server supports compression

    - #### setCompressionSupported

          public HttpServerOptions setCompressionSupported(boolean compressionSupported)

      Set whether the server supports compression
      Parameters:
        `compressionSupported` - true if compression supported
      Returns:
        a reference to this, so the API can be used fluently

    - #### getMaxWebsocketFrameSize

          public int getMaxWebsocketFrameSize()

      Returns:
        the maximum websocket framesize

    - #### setMaxWebsocketFrameSize

          public HttpServerOptions setMaxWebsocketFrameSize(int maxWebsocketFrameSize)

      Set the maximum websocket frames size
      Parameters:
        `maxWebsocketFrameSize` - the maximum frame size in bytes.
      Returns:
        a reference to this, so the API can be used fluently

    - #### setWebsocketSubProtocol

          public HttpServerOptions setWebsocketSubProtocol(String subProtocols)

      Set the websocket subprotocols supported by the server.
      Parameters:
        `subProtocols` - comma separated list of subprotocols
      Returns:
        a reference to this, so the API can be used fluently

    - #### getWebsocketSubProtocols

          public String getWebsocketSubProtocols()

      Returns:
        Get the websocket subprotocols

    - #### setClientAuthRequired

          public HttpServerOptions setClientAuthRequired(boolean clientAuthRequired)

      Description copied from class: `NetServerOptions`
      Set whether client auth is required
      Overrides:
        `setClientAuthRequired` in class `NetServerOptions`
      Parameters:
        `clientAuthRequired` - true if client auth is required
      Returns:
        a reference to this, so the API can be used fluently

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `NetServerOptions`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `NetServerOptions`

Copyright © 2015. All Rights Reserved.