Class InetSocketAddress.Builder<B extends InetSocketAddress.Builder<B>>

Type Parameters:
B - the type of the Builder that is returned
All Implemented Interfaces:
BuilderInterface
Direct Known Subclasses:
ProxyAddress.Builder
Enclosing class:
InetSocketAddress

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

    • Builder

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

    • build

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

      public B setAddress(InetAddress address)
      The address.
      Parameters:
      address - the value for the address property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      2.22
    • setFlowinfo

      public B setFlowinfo(int flowinfo)

      The sin6_flowinfo field, for IPv6 addresses.

      If unset this property is inherited from Gio.InetSocketAddress:address.

      Parameters:
      flowinfo - the value for the flowinfo property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      2.32
    • setPort

      public B setPort(int port)
      The port.
      Parameters:
      port - the value for the port property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      2.22
    • setScopeId

      public B setScopeId(int scopeId)

      The sin6_scope_id field, for IPv6 addresses.

      If unset this property is inherited from Gio.InetSocketAddress:address.

      Parameters:
      scopeId - the value for the scope-id property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      2.32