Package org.gnome.gio
Class InetSocketAddress.Builder<B extends InetSocketAddress.Builder<B>>
java.lang.Object
io.github.jwharm.javagi.gobject.Builder<B>
org.gnome.gobject.GObject.Builder<B>
org.gnome.gio.SocketAddress.Builder<B>
org.gnome.gio.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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Finish building theInetSocketAddress
object.setAddress
(InetAddress address) The address.setFlowinfo
(int flowinfo) Thesin6_flowinfo
field, for IPv6 addresses.setPort
(int port) The port.setScopeId
(int scopeId) Thesin6_scope_id
field, for IPv6 addresses.Methods inherited from class org.gnome.gobject.GObject.Builder
onNotify
Methods inherited from class io.github.jwharm.javagi.gobject.Builder
addBuilderProperty, connect, connect, connectSignals, getArena, getNames, getValues
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilder
object.
-
-
Method Details
-
build
Finish building theInetSocketAddress
object. This will callGObject.withProperties(org.gnome.glib.Type, java.lang.String[], org.gnome.gobject.Value[])
to create a new GObject instance, which is then cast toInetSocketAddress
.- Overrides:
build
in classSocketAddress.Builder<B extends InetSocketAddress.Builder<B>>
- Returns:
- a new instance of
InetSocketAddress
with the properties that were set in the Builder object.
-
setAddress
The address.- Parameters:
address
- the value for theaddress
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setFlowinfo
Thesin6_flowinfo
field, for IPv6 addresses.- Parameters:
flowinfo
- the value for theflowinfo
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setPort
The port.- Parameters:
port
- the value for theport
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setScopeId
Thesin6_scope_id
field, for IPv6 addresses.- Parameters:
scopeId
- the value for thescope-id
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-