io.vertx.core.net

## Class NetworkOptions

- java.lang.Object
- - io.vertx.core.net.NetworkOptions

- Direct Known Subclasses:
    DatagramSocketOptions, TCPSSLOptions

      public abstract class NetworkOptions
      extends Object

  Author:
    Tim Fox

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static boolean` | `DEFAULT_LOG_ENABLED` The default log enabled = false
    `static int` | `DEFAULT_RECEIVE_BUFFER_SIZE` The default value of TCP receive buffer size
    `static boolean` | `DEFAULT_REUSE_ADDRESS` The default value of reuse address
    `static int` | `DEFAULT_SEND_BUFFER_SIZE` The default value of TCP send buffer size
    `static int` | `DEFAULT_TRAFFIC_CLASS` The default value of traffic class

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `NetworkOptions()` Default constructor
    `NetworkOptions(JsonObject json)` Constructor from JSON
    `NetworkOptions(NetworkOptions other)` Copy constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object o)`
    `boolean` | `getLogActivity()`
    `int` | `getReceiveBufferSize()` Return the TCP receive buffer size, in bytes
    `int` | `getSendBufferSize()` Return the TCP send buffer size, in bytes.
    `int` | `getTrafficClass()`
    `int` | `hashCode()`
    `boolean` | `isReuseAddress()`
    `NetworkOptions` | `setLogActivity(boolean logActivity)` Set to true to enabled network activity logging: Netty's pipeline is configured for logging on Netty's logger.
    `NetworkOptions` | `setReceiveBufferSize(int receiveBufferSize)` Set the TCP receive buffer size
    `NetworkOptions` | `setReuseAddress(boolean reuseAddress)` Set the value of reuse address
    `NetworkOptions` | `setSendBufferSize(int sendBufferSize)` Set the TCP send buffer size
    `NetworkOptions` | `setTrafficClass(int trafficClass)` Set the value of traffic class
    `JsonObject` | `toJson()` Convert to JSON

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

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

- - ### Field Detail

    - #### DEFAULT_SEND_BUFFER_SIZE

          public static final int DEFAULT_SEND_BUFFER_SIZE

      The default value of TCP send buffer size
      See Also:
        Constant Field Values

    - #### DEFAULT_RECEIVE_BUFFER_SIZE

          public static final int DEFAULT_RECEIVE_BUFFER_SIZE

      The default value of TCP receive buffer size
      See Also:
        Constant Field Values

    - #### DEFAULT_TRAFFIC_CLASS

          public static final int DEFAULT_TRAFFIC_CLASS

      The default value of traffic class
      See Also:
        Constant Field Values

    - #### DEFAULT_REUSE_ADDRESS

          public static final boolean DEFAULT_REUSE_ADDRESS

      The default value of reuse address
      See Also:
        Constant Field Values

    - #### DEFAULT_LOG_ENABLED

          public static final boolean DEFAULT_LOG_ENABLED

      The default log enabled = false
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### NetworkOptions

          public NetworkOptions()

      Default constructor

    - #### NetworkOptions

          public NetworkOptions(NetworkOptions other)

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

    - #### NetworkOptions

          public NetworkOptions(JsonObject json)

      Constructor from JSON
      Parameters:
        `json` - the JSON

  - ### Method Detail

    - #### toJson

          public JsonObject toJson()

      Convert to JSON
      Returns:
        the JSON

    - #### getSendBufferSize

          public int getSendBufferSize()

      Return the TCP send buffer size, in bytes.
      Returns:
        the send buffer size

    - #### setSendBufferSize

          public NetworkOptions setSendBufferSize(int sendBufferSize)

      Set the TCP send buffer size
      Parameters:
        `sendBufferSize` - the buffers size, in bytes
      Returns:
        a reference to this, so the API can be used fluently

    - #### getReceiveBufferSize

          public int getReceiveBufferSize()

      Return the TCP receive buffer size, in bytes
      Returns:
        the receive buffer size

    - #### setReceiveBufferSize

          public NetworkOptions setReceiveBufferSize(int receiveBufferSize)

      Set the TCP receive buffer size
      Parameters:
        `receiveBufferSize` - the buffers size, in bytes
      Returns:
        a reference to this, so the API can be used fluently

    - #### isReuseAddress

          public boolean isReuseAddress()

      Returns:
        the value of reuse address

    - #### setReuseAddress

          public NetworkOptions setReuseAddress(boolean reuseAddress)

      Set the value of reuse address
      Parameters:
        `reuseAddress` - the value of reuse address
      Returns:
        a reference to this, so the API can be used fluently

    - #### getTrafficClass

          public int getTrafficClass()

      Returns:
        the value of traffic class

    - #### setTrafficClass

          public NetworkOptions setTrafficClass(int trafficClass)

      Set the value of traffic class
      Parameters:
        `trafficClass` - the value of traffic class
      Returns:
        a reference to this, so the API can be used fluently

    - #### getLogActivity

          public boolean getLogActivity()

      Returns:
        true when network activity logging is enabled

    - #### setLogActivity

          public NetworkOptions setLogActivity(boolean logActivity)

      Set to true to enabled network activity logging: Netty's pipeline is configured for logging on Netty's logger.
      Parameters:
        `logActivity` - true for logging the network activity
      Returns:
        a reference to this, so the API can be used fluently

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

Copyright © 2017. All rights reserved.