Package org.gnome.gio
Class SocketListener.Builder<B extends SocketListener.Builder<B>>
java.lang.Object
org.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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Finish building theSocketListenerobject.onEvent(SocketListener.EventCallback handler) Emitted whenlistener'sactivity onsocketchanges state.setListenBacklog(int listenBacklog) The number of outstanding connections in the listen queue.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 theSocketListenerobject. 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:
buildin classGObject.Builder<B extends SocketListener.Builder<B>>- Returns:
- a new instance of
SocketListenerwith 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-backlogproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 2.22
-
onEvent
Emitted whenlistener'sactivity onsocketchanges state. Note that whenlisteneris 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
Builderinstance is returned, to allow method chaining - Since:
- 2.46
- See Also:
-