Class SimpleProxyResolver

All Implemented Interfaces:
PointerInterface

public class SimpleProxyResolver extends Object
#GSimpleProxyResolver is a simple #GProxyResolver implementation
that handles a single default proxy, multiple URI-scheme-specific
proxies, and a list of hosts that proxies should not be used for.

#GSimpleProxyResolver is never the default proxy resolver, but it
can be used as the base class for another proxy resolver
implementation, or it can be created and used manually, such as
with g_socket_client_set_proxy_resolver().

https://docs.gtk.org/gio/class.SimpleProxyResolver.html

  • Constructor Details

  • Method Details

    • getClassHandler

      public static ClassHandler getClassHandler()
    • setDefaultProxy

      public void setDefaultProxy(@Nullable Str default_proxy)
      Sets the default proxy on @resolver, to be used for any URIs that
      don't match #GSimpleProxyResolver:ignore-hosts or a proxy set
      via g_simple_proxy_resolver_set_uri_proxy().

      If @default_proxy starts with "socks://",
      #GSimpleProxyResolver will treat it as referring to all three of
      the socks5, socks4a, and socks4 proxy types.
      Parameters:
      default_proxy - the default proxy to use
    • setDefaultProxy

      public void setDefaultProxy(String default_proxy)
      Sets the default proxy on @resolver, to be used for any URIs that
      don't match #GSimpleProxyResolver:ignore-hosts or a proxy set
      via g_simple_proxy_resolver_set_uri_proxy().

      If @default_proxy starts with "socks://",
      #GSimpleProxyResolver will treat it as referring to all three of
      the socks5, socks4a, and socks4 proxy types.
      Parameters:
      default_proxy - the default proxy to use
    • setUriProxy

      public void setUriProxy(@Nonnull Str uri_scheme, @Nonnull Str proxy)
      Adds a URI-scheme-specific proxy to @resolver; URIs whose scheme
      matches @uri_scheme (and which don't match
      #GSimpleProxyResolver:ignore-hosts) will be proxied via @proxy.

      As with #GSimpleProxyResolver:default-proxy, if @proxy starts with
      "socks://", #GSimpleProxyResolver will treat it
      as referring to all three of the socks5, socks4a, and socks4 proxy
      types.
      Parameters:
      uri_scheme - the URI scheme to add a proxy for
      proxy - the proxy to use for @uri_scheme
    • setUriProxy

      public void setUriProxy(String uri_scheme, String proxy)
      Adds a URI-scheme-specific proxy to @resolver; URIs whose scheme
      matches @uri_scheme (and which don't match
      #GSimpleProxyResolver:ignore-hosts) will be proxied via @proxy.

      As with #GSimpleProxyResolver:default-proxy, if @proxy starts with
      "socks://", #GSimpleProxyResolver will treat it
      as referring to all three of the socks5, socks4a, and socks4 proxy
      types.
      Parameters:
      uri_scheme - the URI scheme to add a proxy for
      proxy - the proxy to use for @uri_scheme
    • asProxyResolver

      public ProxyResolver asProxyResolver()
      Implements interface ProxyResolver. Call this to get access to interface functions.
      Returns:
      ProxyResolver
    • getTypeID

      public static long getTypeID()
    • getParentTypeID

      public static long getParentTypeID()
    • getTypeSize

      public static TypeSystem.TypeSize getTypeSize()
    • getParentTypeSize

      public static TypeSystem.TypeSize getParentTypeSize()
    • getInstanceSize

      public static int getInstanceSize()