Package org.gnome.soup
Class CookieJar.Builder<B extends CookieJar.Builder<B>>
java.lang.Object
io.github.jwharm.javagi.gobject.Builder<B>
org.gnome.gobject.GObject.Builder<B>
org.gnome.soup.CookieJar.Builder<B>
- Type Parameters:
B
- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
- Direct Known Subclasses:
CookieJarDB.Builder
,CookieJarText.Builder
- Enclosing class:
CookieJar
Inner class implementing a builder pattern to construct a GObject with
properties.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Finish building theCookieJar
object.onChanged
(CookieJar.ChangedCallback handler) Emitted whenjar
changes.setAcceptPolicy
(CookieJarAcceptPolicy acceptPolicy) The policy the jar should follow to accept or reject cookies.setReadOnly
(boolean readOnly) Whether or not the cookie jar is read-only.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 theCookieJar
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 toCookieJar
.- Overrides:
build
in classGObject.Builder<B extends CookieJar.Builder<B>>
- Returns:
- a new instance of
CookieJar
with the properties that were set in the Builder object. - Throws:
UnsupportedPlatformException
- when run on an unsupported platform
-
setAcceptPolicy
The policy the jar should follow to accept or reject cookies.- Parameters:
acceptPolicy
- the value for theaccept-policy
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setReadOnly
Whether or not the cookie jar is read-only.- Parameters:
readOnly
- the value for theread-only
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
onChanged
Emitted whenjar
changes.If a cookie has been added,
newCookie
will contain the newly-added cookie andoldCookie
will benull
. If a cookie has been deleted,oldCookie
will contain the to-be-deleted cookie andnewCookie
will benull
. If a cookie has been changed,oldCookie
will contain its old value, andnewCookie
its new value.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-