Class Resolver.Builder<B extends Resolver.Builder<B>>

Type Parameters:
B - the type of the Builder that is returned
All Implemented Interfaces:
BuilderInterface
Direct Known Subclasses:
ThreadedResolver.Builder
Enclosing class:
Resolver

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

    • Builder

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

    • build

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

      public B setTimeout(int timeout)

      The timeout applied to all resolver lookups, in milliseconds.

      This may be changed through the lifetime of the GResolver. The new value will apply to any lookups started after the change, but not to any already-ongoing lookups.

      If this is 0, no timeout is applied to lookups.

      No timeout was applied to lookups before this property was added in GLib 2.78.

      Parameters:
      timeout - the value for the timeout property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      2.78
    • onReload

      public B onReload(Resolver.ReloadCallback handler)
      Emitted when the resolver notices that the system resolver configuration has changed.
      Parameters:
      handler - the signal handler
      Returns:
      the Builder instance is returned, to allow method chaining
      See Also: