Class ProxyAddress.Builder<B extends ProxyAddress.Builder<B>>

Type Parameters:
B - the type of the Builder that is returned
All Implemented Interfaces:
BuilderInterface
Enclosing class:
ProxyAddress

public static class ProxyAddress.Builder<B extends ProxyAddress.Builder<B>> extends InetSocketAddress.Builder<B>
Inner class implementing a builder pattern to construct a GObject with properties.
Since:
2.26
  • Constructor Details

    • Builder

      protected Builder()
      Default constructor for a Builder object.
  • Method Details

    • build

      public ProxyAddress build()
      Finish building the ProxyAddress object. This will call GObject.withProperties(Type, String[], Value[]) to create a new GObject instance, which is then cast to ProxyAddress.
      Overrides:
      build in class InetSocketAddress.Builder<B extends ProxyAddress.Builder<B>>
      Returns:
      a new instance of ProxyAddress with the properties that were set in the Builder object.
    • setDestinationHostname

      public B setDestinationHostname(String destinationHostname)
      The proxy destination hostname.
      Parameters:
      destinationHostname - the value for the destination-hostname property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      2.26
    • setDestinationPort

      public B setDestinationPort(int destinationPort)
      The proxy destination port.
      Parameters:
      destinationPort - the value for the destination-port property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      2.26
    • setDestinationProtocol

      public B setDestinationProtocol(String destinationProtocol)
      The protocol being spoke to the destination host, or null if the GProxyAddress doesn't know.
      Parameters:
      destinationProtocol - the value for the destination-protocol property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      2.34
    • setPassword

      public B setPassword(String password)
      The proxy password.
      Parameters:
      password - the value for the password property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      2.26
    • setProtocol

      public B setProtocol(String protocol)
      The proxy protocol.
      Parameters:
      protocol - the value for the protocol property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      2.26
    • setUri

      public B setUri(String uri)
      The URI string that the proxy was constructed from (or null if the creator didn't specify this).
      Parameters:
      uri - the value for the uri property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      2.34
    • setUsername

      public B setUsername(String username)
      The proxy username.
      Parameters:
      username - the value for the username property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      2.26