Package org.gnome.gio
Class SocketListener.Builder<B extends SocketListener.Builder<B>>
java.lang.Object
io.github.jwharm.javagi.gobject.Builder<B>
org.gnome.gobject.GObject.Builder<B>
org.gnome.gio.SocketListener.Builder<B>
- Type Parameters:
B
- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
- Direct Known Subclasses:
SocketService.Builder
- Enclosing class:
SocketListener
public static class SocketListener.Builder<B extends SocketListener.Builder<B>>
extends GObject.Builder<B>
Inner class implementing a builder pattern to construct a GObject with
properties.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Finish building theSocketListener
object.onEvent
(SocketListener.EventCallback handler) Emitted whenlistener
's activity onsocket
changes state.setListenBacklog
(int listenBacklog) The number of outstanding connections in the listen queue.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 theSocketListener
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 toSocketListener
.- Overrides:
build
in classGObject.Builder<B extends SocketListener.Builder<B>>
- Returns:
- a new instance of
SocketListener
with the properties that were set in the Builder object.
-
setListenBacklog
The number of outstanding connections in the listen queue.- Parameters:
listenBacklog
- the value for thelisten-backlog
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
onEvent
Emitted whenlistener
's activity onsocket
changes state. Note that whenlistener
is used to listen on both IPv4 and IPv6, a separate set of signals will be emitted for each, and the order they happen in is undefined.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-