io.vertx.core.net

## Class ProxyOptions

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

-     public class ProxyOptions
      extends Object

  Proxy options for a net client or a net client.
  Author:
    Alexander Lehmann

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `DEFAULT_HOST` The default hostname for proxy connect = "localhost"
    `static int` | `DEFAULT_PORT` The default port for proxy connect = 3128 3128 is the default port for e.g.
    `static ProxyType` | `DEFAULT_TYPE` The default proxy type (HTTP)

  - ### Constructor Summary

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

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object o)`
    `String` | `getHost()` Get proxy host.
    `String` | `getPassword()` Get proxy password.
    `int` | `getPort()` Get proxy port.
    `ProxyType` | `getType()` Get proxy type.
    `String` | `getUsername()` Get proxy username.
    `int` | `hashCode()`
    `ProxyOptions` | `setHost(String host)` Set proxy host.
    `ProxyOptions` | `setPassword(String password)` Set proxy password.
    `ProxyOptions` | `setPort(int port)` Set proxy port.
    `ProxyOptions` | `setType(ProxyType type)` Set proxy type.
    `ProxyOptions` | `setUsername(String username)` Set proxy username.

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

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

- - ### Field Detail

    - #### DEFAULT_TYPE

          public static final ProxyType DEFAULT_TYPE

      The default proxy type (HTTP)

    - #### DEFAULT_PORT

          public static final int DEFAULT_PORT

      The default port for proxy connect = 3128 3128 is the default port for e.g. Squid
      See Also:
        Constant Field Values

    - #### DEFAULT_HOST

          public static final String DEFAULT_HOST

      The default hostname for proxy connect = "localhost"
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### ProxyOptions

          public ProxyOptions()

      Default constructor.

    - #### ProxyOptions

          public ProxyOptions(ProxyOptions other)

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

    - #### ProxyOptions

          public ProxyOptions(JsonObject json)

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

  - ### Method Detail

    - #### getHost

          public String getHost()

      Get proxy host.
      Returns:
        proxy hosts

    - #### setHost

          public ProxyOptions setHost(String host)

      Set proxy host.
      Parameters:
        `host` - the proxy host to connect to
      Returns:
        a reference to this, so the API can be used fluently

    - #### getPort

          public int getPort()

      Get proxy port.
      Returns:
        proxy port

    - #### setPort

          public ProxyOptions setPort(int port)

      Set proxy port.
      Parameters:
        `port` - the proxy port to connect to
      Returns:
        a reference to this, so the API can be used fluently

    - #### getUsername

          public String getUsername()

      Get proxy username.
      Returns:
        proxy username

    - #### setUsername

          public ProxyOptions setUsername(String username)

      Set proxy username.
      Parameters:
        `username` - the proxy username
      Returns:
        a reference to this, so the API can be used fluently

    - #### getPassword

          public String getPassword()

      Get proxy password.
      Returns:
        proxy password

    - #### setPassword

          public ProxyOptions setPassword(String password)

      Set proxy password.
      Parameters:
        `password` - the proxy password
      Returns:
        a reference to this, so the API can be used fluently

    - #### getType

          public ProxyType getType()

      Get proxy type.

      ProxyType can be HTTP, SOCKS4 and SOCKS5

      Returns:
        proxy type

    - #### setType

          public ProxyOptions setType(ProxyType type)

      Set proxy type.

      ProxyType can be HTTP, SOCKS4 and SOCKS5

      Parameters:
        `type` - the proxy type to connect to
      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 © 2016. All rights reserved.