/libcore/luni/src/main/java/java/lang/reflect/ |
H A D | InvocationHandler.java | 21 * Implementors of this interface dispatch methods invoked on proxy instances. 28 * Handles the method which was originally invoked on the proxy instance. A 32 * public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { 36 * Object result = method.invoke(proxy, args); 42 * @param proxy 43 * the proxy instance on which the method was invoked 45 * the method invoked on the proxy instance 54 * the exception to throw from the invoked method on the proxy. 59 public Object invoke(Object proxy, Method method, Object[] args) throws Throwable; argument
|
H A D | Proxy.java | 27 * {@code Proxy} defines methods for creating dynamic proxy classes and instances. 28 * A proxy class implements a declared set of interfaces and delegates method 60 * the invocation handler for the newly created proxy 75 * the class loader that will define the proxy class 78 * interface that will be implemented by the returned proxy 80 * @return a proxy class that implements all of the interfaces referred to 131 // search cache for matching proxy class using the class loader 191 * the class loader that will define the proxy class 194 * interface that will be implemented by the returned proxy 199 * @return a new proxy objec 260 getInvocationHandler(Object proxy) argument [all...] |
/libcore/luni/src/main/java/libcore/net/http/ |
H A D | HttpHandler.java | 32 @Override protected URLConnection openConnection(URL url, Proxy proxy) throws IOException { argument 33 if (url == null || proxy == null) { 34 throw new IllegalArgumentException("url == null || proxy == null"); 36 return new HttpURLConnectionImpl(url, getDefaultPort(), proxy);
|
H A D | HttpsHandler.java | 32 @Override protected URLConnection openConnection(URL url, Proxy proxy) throws IOException { argument 33 if (url == null || proxy == null) { 34 throw new IllegalArgumentException("url == null || proxy == null"); 36 return new HttpsURLConnectionImpl(url, getDefaultPort(), proxy);
|
H A D | HttpConnection.java | 44 * to the origin server or via a proxy. Create an instance using the {@link 72 socketCandidate = (config.proxy != null && config.proxy.type() != Proxy.Type.HTTP) 73 ? new Socket(config.proxy) 90 Proxy proxy, boolean requiresTunnel, int connectTimeout) throws IOException { 92 * Try an explicitly-specified proxy. 94 if (proxy != null) { 95 Address address = (proxy.type() == Proxy.Type.DIRECT) 97 : new Address(uri, sslSocketFactory, proxy, requiresTunnel); 260 * origin address of the resource. These are the same unless a proxy i 89 connect(URI uri, SSLSocketFactory sslSocketFactory, Proxy proxy, boolean requiresTunnel, int connectTimeout) argument 265 private final Proxy proxy; field in class:HttpConnection.Address 292 Address(URI uri, SSLSocketFactory sslSocketFactory, Proxy proxy, boolean requiresTunnel) argument [all...] |
H A D | HttpURLConnectionImpl.java | 59 private Proxy proxy; field in class:HttpURLConnectionImpl 73 protected HttpURLConnectionImpl(URL url, int port, Proxy proxy) { argument 75 this.proxy = proxy; 216 ? ((InetSocketAddress) proxy.address()).getHostName() 222 ? ((InetSocketAddress) proxy.address()).getPort() 353 * headers, proxy and target URL or this connection may be adjusted to 361 "Received HTTP_PROXY_AUTH (407) code while not using proxy"); 460 ? ((InetSocketAddress) proxy.address()).getAddress() 479 return proxy; 482 setProxy(Proxy proxy) argument [all...] |
H A D | HttpsURLConnectionImpl.java | 50 protected HttpsURLConnectionImpl(URL url, int port, Proxy proxy) { argument 52 delegate = new HttpUrlConnectionDelegate(url, port, proxy); 379 private HttpUrlConnectionDelegate(URL url, int port, Proxy proxy) { argument 380 super(url, port, proxy); 459 // make an SSL Tunnel on the first message pair of each SSL + proxy connection 483 * To make an HTTPS connection over an HTTP proxy, send an unencrypted 484 * CONNECT request to create the proxy connection. This may need to be 485 * retried if the proxy requires authorization. 506 throw new IOException("Failed to authenticate with proxy"); 519 // Even if there is a proxy, i [all...] |
/libcore/luni/src/main/java/libcore/net/url/ |
H A D | FtpHandler.java | 36 * Returns a connection, which is established via the <code>proxy</code>, 38 * <code>proxy</code> is DIRECT type, the connection is made in normal 43 * @param proxy 44 * the proxy which is used to make the connection 50 * if any argument is null or the type of proxy is wrong. 55 protected URLConnection openConnection(URL url, Proxy proxy) throws IOException { argument 56 if (url == null || proxy == null) { 57 throw new IllegalArgumentException("url == null || proxy == null"); 59 return new FtpURLConnection(url, proxy);
|
H A D | FileHandler.java | 48 * <code>proxy</code> is not used in FileURLConnection. 52 * @param proxy 64 public URLConnection openConnection(URL url, Proxy proxy) throws IOException { argument 76 return (proxy == null) ? ftpURL.openConnection() : ftpURL.openConnection(proxy);
|
H A D | FtpURLConnection.java | 95 private Proxy proxy; field in class:FtpURLConnection 131 * @param proxy 133 protected FtpURLConnection(URL url, Proxy proxy) { argument 135 this.proxy = proxy; 168 // Use system-wide ProxySelect to select proxy list, 169 // then try to connect via elements in the proxy list. 171 if (proxy != null) { 173 proxyList.add(proxy);
|
/libcore/luni/src/test/java/libcore/java/lang/reflect/ |
H A D | ProxyTest.java | 28 * Make sure the proxy's class loader fails if it cannot see the class 52 Object proxy = Proxy.newProxyInstance(loaderA, interfacesA, invocationHandlerB); 53 assertEquals(loaderA, proxy.getClass().getClassLoader()); 54 assertEquals("foo", proxy.getClass().getMethod("echo", String.class).invoke(proxy, "foo")); 62 public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { argument
|
/libcore/luni/src/main/java/org/apache/harmony/lang/annotation/ |
H A D | AnnotationFactory.java | 36 * The annotation implementation based on dynamically generated proxy instances. 281 public Object invoke(Object proxy, Method method, Object[] args) throws Throwable argument
|
/libcore/luni/src/main/java/java/net/ |
H A D | URLStreamHandler.java | 45 * u} using the given {@code proxy}. Since different protocols also have 50 * @param proxy 51 * the proxy that is used to make the connection. 56 * if any argument is {@code null} or the type of proxy is 61 protected URLConnection openConnection(URL u, Proxy proxy) throws IOException { argument
|
H A D | URL.java | 477 * @param proxy the proxy through which the connection will be established. 479 * @throws IllegalArgumentException if the argument proxy is null or of is 484 public URLConnection openConnection(Proxy proxy) throws IOException { argument 485 if (proxy == null) { 486 throw new IllegalArgumentException("proxy == null"); 488 return streamHandler.openConnection(this, proxy);
|
H A D | PlainSocketImpl.java | 58 private Proxy proxy; field in class:PlainSocketImpl 69 public PlainSocketImpl(Proxy proxy) { argument 71 this.proxy = proxy; 120 return proxy != null && proxy.type() == Proxy.Type.SOCKS; 293 * Gets the SOCKS proxy server port. 296 // get socks server port from proxy. It is unnecessary to check 297 // "socksProxyPort" property, since proxy setting should only be 299 InetSocketAddress addr = (InetSocketAddress) proxy [all...] |
H A D | Socket.java | 34 private final Proxy proxy; field in class:Socket 57 this.proxy = null; 61 * Creates a new unconnected socket using the given proxy type. When a 67 * proxy server: <br> 71 * @param proxy 72 * the specified proxy for this socket. 74 * if the argument {@code proxy} is {@code null} or of an 79 public Socket(Proxy proxy) { argument 80 if (proxy == null || proxy [all...] |
/libcore/luni/src/test/java/tests/api/java/lang/reflect/ |
H A D | ProxyTest.java | 52 public Object invoke(Object proxy, Method method, Object[] args) argument 69 Class proxy = Proxy.getProxyClass(Support_Proxy_I1.class 73 proxy.getSuperclass() == Proxy.class); 75 .isProxyClass(proxy)); 101 public Object invoke(Object proxy, Method method, Object[] args) 118 public Object invoke(Object proxy, Method method, Object[] args) 121 return new Boolean(proxy == args[0]); 138 Support_Proxy_I1 proxy = (Support_Proxy_I1) p; 139 assertTrue("Failed identity test ", proxy.equals(proxy)); [all...] |
/libcore/luni/src/test/java/libcore/java/net/ |
H A D | OldURLTest.java | 648 public URLConnection openConnection(URL arg0, Proxy proxy) argument 650 return super.openConnection(u, proxy);
|