Class Proxy

All Implemented Interfaces:
Serializable, InputLocationTracker

The <proxy> element contains information required to a proxy settings.
See Also:
  • Constructor Details

  • Method Details

    • getActiveString

      public String getActiveString()
      Whether this proxy configuration is the active one. Note: While the type of this field is String for technical reasons, the semantic type is actually boolean.
      Returns:
      a String
      See Also:
    • 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
    • getPortString

      public String getPortString()
      The proxy port. Note: While the type of this field is String for technical reasons, the semantic type is actually int.
      Returns:
      a String
      See Also:
    • 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
    • getLocation

      public InputLocation getLocation(Object key)
      Gets the location of the specified field in the input source.
      Specified by:
      getLocation in interface InputLocationTracker
      Overrides:
      getLocation in class IdentifiableBase
    • getLocationKeys

      public Set<Object> getLocationKeys()
      Gets the keys of the locations of the input source.
      Overrides:
      getLocationKeys in class IdentifiableBase
    • 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
    • withActiveString

      @Nonnull public Proxy withActiveString(String activeString)
      Creates a new Proxy instance using the specified activeString.
      Parameters:
      activeString - the new String to use
      Returns:
      a Proxy with the specified activeString
    • 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
    • withPortString

      @Nonnull public Proxy withPortString(String portString)
      Creates a new Proxy instance using the specified portString.
      Parameters:
      portString - the new String to use
      Returns:
      a Proxy with the specified portString
    • 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
    • isActive

      public boolean isActive()
      Indicates if this proxy is active. To allow interpolation of this field, this method lazily parses the getActiveString() value as a boolean and defaults to true if not set.
      Returns:
      a boolean indicating if this proxy is active
    • getPort

      public int getPort()
      Returns the port to use for this proxy. To allow interpolation of this field, this method lazily parses the getPortString() value as an integer and defaults to 8080 if not set.
      Returns:
      an integer indicating the port to use for this proxy