Class Proxy

All Implemented Interfaces:
Serializable

@Experimental @Generated @ThreadSafe @Immutable public class Proxy extends IdentifiableBase implements Serializable
The <proxy> element contains informations required to a proxy settings.
See Also:
  • Method Details

    • isActive

      public boolean isActive()
      Whether this proxy configuration is the active one.
      Returns:
      a boolean
    • getProtocol

      public String getProtocol()
      The proxy protocol.
      Returns:
      a String
    • getUsername

      public String getUsername()
      The proxy user.
      Returns:
      a String
    • getPassword

      public String getPassword()
      The proxy password.
      Returns:
      a String
    • getPort

      public int getPort()
      The proxy port.
      Returns:
      a int
    • getHost

      public String getHost()
      The proxy host.
      Returns:
      a String
    • getNonProxyHosts

      public String getNonProxyHosts()
      The list of non-proxied hosts (delimited by |).
      Returns:
      a String
    • with

      @Nonnull public Proxy.Builder with()
      Creates a new builder with this object as the basis.
      Overrides:
      with in class IdentifiableBase
      Returns:
      a Builder
    • withId

      @Nonnull public Proxy withId(String id)
      Creates a new Proxy instance using the specified id.
      Overrides:
      withId in class IdentifiableBase
      Parameters:
      id - the new String to use
      Returns:
      a Proxy with the specified id
    • withActive

      @Nonnull public Proxy withActive(boolean active)
      Creates a new Proxy instance using the specified active.
      Parameters:
      active - the new boolean to use
      Returns:
      a Proxy with the specified active
    • withProtocol

      @Nonnull public Proxy withProtocol(String protocol)
      Creates a new Proxy instance using the specified protocol.
      Parameters:
      protocol - the new String to use
      Returns:
      a Proxy with the specified protocol
    • withUsername

      @Nonnull public Proxy withUsername(String username)
      Creates a new Proxy instance using the specified username.
      Parameters:
      username - the new String to use
      Returns:
      a Proxy with the specified username
    • withPassword

      @Nonnull public Proxy withPassword(String password)
      Creates a new Proxy instance using the specified password.
      Parameters:
      password - the new String to use
      Returns:
      a Proxy with the specified password
    • withPort

      @Nonnull public Proxy withPort(int port)
      Creates a new Proxy instance using the specified port.
      Parameters:
      port - the new int to use
      Returns:
      a Proxy with the specified port
    • withHost

      @Nonnull public Proxy withHost(String host)
      Creates a new Proxy instance using the specified host.
      Parameters:
      host - the new String to use
      Returns:
      a Proxy with the specified host
    • withNonProxyHosts

      @Nonnull public Proxy withNonProxyHosts(String nonProxyHosts)
      Creates a new Proxy instance using the specified nonProxyHosts.
      Parameters:
      nonProxyHosts - the new String to use
      Returns:
      a Proxy with the specified nonProxyHosts
    • newInstance

      @Nonnull public static Proxy newInstance()
      Creates a new Proxy instance. Equivalent to newInstance( true ).
      Returns:
      a new Proxy
      See Also:
    • newInstance

      @Nonnull public static Proxy newInstance(boolean withDefaults)
      Creates a new Proxy instance using default values or not. Equivalent to newBuilder( withDefaults ).build().
      Parameters:
      withDefaults - the boolean indicating whether default values should be used
      Returns:
      a new Proxy
    • newBuilder

      @Nonnull public static Proxy.Builder newBuilder()
      Creates a new Proxy builder instance. Equivalent to newBuilder( true ).
      Returns:
      a new Builder
      See Also:
    • newBuilder

      @Nonnull public static Proxy.Builder newBuilder(boolean withDefaults)
      Creates a new Proxy builder instance using default values or not.
      Parameters:
      withDefaults - the boolean indicating whether default values should be used
      Returns:
      a new Builder
    • newBuilder

      @Nonnull public static Proxy.Builder newBuilder(Proxy from)
      Creates a new Proxy builder instance using the specified object as a basis. Equivalent to newBuilder( from, false ).
      Parameters:
      from - the Proxy instance to use as a basis
      Returns:
      a new Builder
    • newBuilder

      @Nonnull public static Proxy.Builder newBuilder(Proxy from, boolean forceCopy)
      Creates a new Proxy builder instance using the specified object as a basis.
      Parameters:
      from - the Proxy instance to use as a basis
      forceCopy - the boolean indicating if a copy should be forced
      Returns:
      a new Builder