Package org.gnome.gio
Class Socket.Builder<B extends Socket.Builder<B>>
java.lang.Object
org.javagi.gobject.Builder<B>
org.gnome.gobject.GObject.Builder<B>
org.gnome.gio.Socket.Builder<B>
- Type Parameters:
B- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
- Enclosing class:
Socket
Inner class implementing a builder pattern to construct a GObject with
properties.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Finish building theSocketobject.setBlocking(boolean blocking) Whether I/O on this socket is blocking.setBroadcast(boolean broadcast) Whether the socket should allow sending to broadcast addresses.setFamily(SocketFamily family) The socket’s address family.setFd(int fd) The socket’s file descriptor.setKeepalive(boolean keepalive) Whether to keep the connection alive by sending periodic pings.setListenBacklog(int listenBacklog) The number of outstanding connections in the listen queue.setMulticastLoopback(boolean multicastLoopback) Whether outgoing multicast packets loop back to the local host.setMulticastTtl(int multicastTtl) Time-to-live out outgoing multicast packetssetProtocol(SocketProtocol protocol) The ID of the protocol to use, or-1for unknown.setTimeout(int timeout) The timeout in seconds on socket I/OsetTtl(int ttl) Time-to-live for outgoing unicast packetssetType(SocketType type) The socket’s type.Methods inherited from class org.gnome.gobject.GObject.Builder
onNotifyMethods inherited from class org.javagi.gobject.Builder
addBuilderProperty, connect, connect, connectSignals, getArena, getNames, getValues
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilderobject.
-
-
Method Details
-
build
Finish building theSocketobject. 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 toSocket.- Overrides:
buildin classGObject.Builder<B extends Socket.Builder<B>>- Returns:
- a new instance of
Socketwith the properties that were set in the Builder object.
-
setBlocking
Whether I/O on this socket is blocking.- Parameters:
blocking- the value for theblockingproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 2.22
-
setBroadcast
Whether the socket should allow sending to broadcast addresses.- Parameters:
broadcast- the value for thebroadcastproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 2.32
-
setFamily
The socket’s address family.- Parameters:
family- the value for thefamilyproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 2.22
-
setFd
The socket’s file descriptor.- Parameters:
fd- the value for thefdproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 2.22
-
setKeepalive
Whether to keep the connection alive by sending periodic pings.- Parameters:
keepalive- the value for thekeepaliveproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 2.22
-
setListenBacklog
The number of outstanding connections in the listen queue.- Parameters:
listenBacklog- the value for thelisten-backlogproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 2.22
-
setMulticastLoopback
Whether outgoing multicast packets loop back to the local host.- Parameters:
multicastLoopback- the value for themulticast-loopbackproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 2.32
-
setMulticastTtl
Time-to-live out outgoing multicast packets- Parameters:
multicastTtl- the value for themulticast-ttlproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 2.32
-
setProtocol
The ID of the protocol to use, or-1for unknown.- Parameters:
protocol- the value for theprotocolproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 2.22
-
setTimeout
The timeout in seconds on socket I/O- Parameters:
timeout- the value for thetimeoutproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 2.26
-
setTtl
Time-to-live for outgoing unicast packets- Parameters:
ttl- the value for thettlproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 2.32
-
setType
The socket’s type.- Parameters:
type- the value for thetypeproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 2.22
-