Home | History | Annotate | Download | only in net

Lines Matching defs:Proxy

33  * A convenience class for accessing the user and default proxy
36 public final class Proxy {
38 private static final String TAG = "Proxy";
43 * Used to notify an app that's caching the proxy that either the default
44 * connection has changed or any connection's proxy has changed. The new
45 * proxy should be queried using {@link ConnectivityManager#getDefaultProxy()}.
53 * It describes the new proxy being used (as a {@link ProxyInfo} object).
54 * @deprecated Because {@code PROXY_CHANGE_ACTION} is sent whenever the proxy
58 * to get the proxy for the Network(s) they are using.
101 * Return the proxy object to be used for the URL given as parameter.
102 * @param ctx A Context used to get the settings for the proxy host.
104 * @return Proxy (java.net) object containing the host name. If the
109 public static final java.net.Proxy getProxy(Context ctx, String url) {
115 List<java.net.Proxy> proxyList = proxySelector.select(uri);
121 return java.net.Proxy.NO_PROXY;
126 * Return the proxy host set by the user.
127 * @param ctx A Context used to get the settings for the proxy host.
131 * @deprecated Use standard java vm proxy values to find the host, port
136 java.net.Proxy proxy = getProxy(ctx, null);
137 if (proxy == java.net.Proxy.NO_PROXY) return null;
139 return ((InetSocketAddress)(proxy.address())).getHostName();
146 * Return the proxy port set by the user.
147 * @param ctx A Context used to get the settings for the proxy port.
148 * @return The port number to use or -1 if no proxy is to be used.
149 * @deprecated Use standard java vm proxy values to find the host, port
154 java.net.Proxy proxy = getProxy(ctx, null);
155 if (proxy == java.net.Proxy.NO_PROXY) return -1;
157 return ((InetSocketAddress)(proxy.address())).getPort();
164 * Return the default proxy host specified by the carrier.
165 * @return String containing the host name or null if there is no proxy for
167 * @deprecated Use standard java vm proxy values to find the host, port and
169 * longer reports only mobile-data apn-based proxy values.
179 * Return the default proxy port specified by the carrier.
180 * @return The port number to be used with the proxy host or -1 if there is
181 * no proxy for this carrier.
182 * @deprecated Use standard java vm proxy values to find the host, port and
184 * longer reports only mobile-data apn-based proxy values.