IT. Expert System.

Android Reference

Proxy


android.net

Class Proxy



  • public final class Proxy
    extends Object
    A convenience class for accessing the user and default proxy settings.
    • Field Detail

      • PROXY_CHANGE_ACTION

        public static final String PROXY_CHANGE_ACTION
        Used to notify an app that's caching the default connection proxy that either the default connection or its proxy has changed. The intent will have the following extra value:

        • EXTRA_PROXY_INFO - The ProxyProperties for the proxy. Non-null, though if the proxy is undefined the host string will be empty.

        This is a protected intent that can only be sent by the system

        See Also:
        Constant Field Values
    • Constructor Detail

      • Proxy

        public Proxy()
    • Method Detail

      • getProxy

        public static final Proxy getProxy(Context ctx,
                     String url)
        Return the proxy object to be used for the URL given as parameter.
        Parameters:
        ctx - A Context used to get the settings for the proxy host.
        url - A URL to be accessed. Used to evaluate exclusion list.
        Returns:
        Proxy (java.net) object containing the host name. If the user did not set a hostname it returns the default host. A null value means that no host is to be used.
      • getHost

        public static final String getHost(Context ctx)
        Deprecated. Use standard java vm proxy values to find the host, port and exclusion list. This call ignores the exclusion list.
        Return the proxy host set by the user.
        Parameters:
        ctx - A Context used to get the settings for the proxy host.
        Returns:
        String containing the host name. If the user did not set a host name it returns the default host. A null value means that no host is to be used.
      • getPort

        public static final int getPort(Context ctx)
        Deprecated. Use standard java vm proxy values to find the host, port and exclusion list. This call ignores the exclusion list.
        Return the proxy port set by the user.
        Parameters:
        ctx - A Context used to get the settings for the proxy port.
        Returns:
        The port number to use or -1 if no proxy is to be used.
      • getDefaultHost

        public static final String getDefaultHost()
        Deprecated. Use standard java vm proxy values to find the host, port and exclusion list. This call ignores the exclusion list and no longer reports only mobile-data apn-based proxy values.
        Return the default proxy host specified by the carrier.
        Returns:
        String containing the host name or null if there is no proxy for this carrier.
      • getDefaultPort

        public static final int getDefaultPort()
        Deprecated. Use standard java vm proxy values to find the host, port and exclusion list. This call ignores the exclusion list and no longer reports only mobile-data apn-based proxy values.
        Return the default proxy port specified by the carrier.
        Returns:
        The port number to be used with the proxy host or -1 if there is no proxy for this carrier.
      • getPreferredHttpHost

        public static final HttpHost getPreferredHttpHost(Context context,
                                    String url)
        Returns the preferred proxy to be used by clients. This is a wrapper around android.net.Proxy#getHost().
        Parameters:
        context - the context which will be passed to android.net.Proxy#getHost()
        url - the target URL for the request
        Returns:
        The preferred proxy to be used by clients, or null if there is no proxy.
      • validate

        public static void validate(String hostname,
                    String port,
                    String exclList)
        Validate syntax of hostname, port and exclusion list entries
      • getAndroidProxySelectorRoutePlanner

        public static final HttpRoutePlanner getAndroidProxySelectorRoutePlanner(Context context)
      • setHttpProxySystemProperty

        public static final void setHttpProxySystemProperty(ProxyProperties p)
      • setHttpProxySystemProperty

        public static final void setHttpProxySystemProperty(String host,
                                      String port,
                                      String exclList)


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 456 / 158856370. Delta: 0.00528 с