Class NetworkSession.Builder<B extends NetworkSession.Builder<B>>

Type Parameters:
B - the type of the Builder that is returned
All Implemented Interfaces:
BuilderInterface
Enclosing class:
NetworkSession

public static class NetworkSession.Builder<B extends NetworkSession.Builder<B>> extends GObject.Builder<B>
Inner class implementing a builder pattern to construct a GObject with properties.
Since:
2.40
  • Constructor Details

    • Builder

      protected Builder()
      Default constructor for a Builder object.
  • Method Details

    • build

      public NetworkSession build()
      Finish building the NetworkSession object. This will call GObject.withProperties(Type, String[], Value[]) to create a new GObject instance, which is then cast to NetworkSession.
      Overrides:
      build in class GObject.Builder<B extends NetworkSession.Builder<B>>
      Returns:
      a new instance of NetworkSession with the properties that were set in the Builder object.
    • setCacheDirectory

      public B setCacheDirectory(String cacheDirectory)
      The base caches directory used to create the WebKitWebsiteDataManager. If null, a default location will be used.
      Parameters:
      cacheDirectory - the value for the cache-directory property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      2.40
    • setDataDirectory

      public B setDataDirectory(String dataDirectory)
      The base data directory used to create the WebKitWebsiteDataManager. If null, a default location will be used.
      Parameters:
      dataDirectory - the value for the data-directory property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      2.40
    • setIsEphemeral

      public B setIsEphemeral(boolean isEphemeral)
      Whether to create an ephermeral WebKitWebsiteDataManager for the session.
      Parameters:
      isEphemeral - the value for the is-ephemeral property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      2.40
    • onDownloadStarted

      public B onDownloadStarted(NetworkSession.DownloadStartedCallback handler)
      This signal is emitted when a new download request is made.
      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      2.40
      See Also: