Searched refs:proxy (Results 1 - 25 of 31) sorted by relevance

12

/libcore/ojluni/src/main/java/sun/net/
H A DApplicationProxy.java36 private ApplicationProxy(Proxy proxy) { argument
37 super(proxy.type(), proxy.address());
40 public static ApplicationProxy create(Proxy proxy) { argument
41 return new ApplicationProxy(proxy);
H A DNetworkClient.java49 protected Proxy proxy = Proxy.NO_PROXY; field in class:NetworkClient
154 if (proxy != null) {
155 if (proxy.type() == Proxy.Type.SOCKS) {
159 return new Socket(proxy);
161 } else if (proxy.type() == Proxy.Type.DIRECT) {
164 // Still connecting through a proxy
165 // server & port will be the proxy address and port
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/net/
H A DProxyTest.java32 // test HTTP type proxy
33 Proxy proxy = new Proxy(Proxy.Type.HTTP, address);
34 assertEquals(Proxy.Type.HTTP, proxy.type());
35 assertEquals(address, proxy.address());
37 // test SOCKS type proxy
38 proxy = new Proxy(Proxy.Type.SOCKS, address);
39 assertEquals(Proxy.Type.SOCKS, proxy.type());
40 assertEquals(address, proxy.address());
42 // test DIRECT type proxy
43 proxy
[all...]
H A DProxySelectorTest.java112 // no proxy, return a proxyList only contains NO_PROXY
116 // set http proxy
119 // set https proxy
122 // set ftp proxy
125 // set socks proxy
153 // no proxy, return a proxyList only contains NO_PROXY
157 // set http proxy
160 // set https proxy
163 // set ftp proxy
166 // set socks proxy
513 assertProxyEquals(List selectedProxyList, Proxy proxy) argument
[all...]
H A DURLTest.java995 public URLConnection openConnection(URL arg0, Proxy proxy) argument
997 return super.openConnection(u, proxy);
/libcore/ojluni/src/main/java/java/lang/reflect/
H A DInvocationHandler.java30 * the <i>invocation handler</i> of a proxy instance.
32 * <p>Each proxy instance has an associated invocation handler.
33 * When a method is invoked on a proxy instance, the method
44 * Processes a method invocation on a proxy instance and returns
46 * when a method is invoked on a proxy instance that it is
49 * @param proxy the proxy instance that the method was invoked on
52 * the interface method invoked on the proxy instance. The declaring
55 * proxy interface that the proxy clas
93 invoke(Object proxy, Method method, Object[] args) argument
[all...]
H A DProxy.java56 * {@code Proxy} provides static methods for creating dynamic proxy
58 * dynamic proxy classes created by those methods.
60 * <p>To create a proxy for some interface {@code Foo}:
74 * <p>A <i>dynamic proxy class</i> (simply referred to as a <i>proxy
79 * A <i>proxy interface</i> is such an interface that is implemented
80 * by a proxy class.
82 * A <i>proxy instance</i> is an instance of a proxy class.
84 * Each proxy instanc
885 getInvocationHandler(Object proxy) argument
911 invoke(Proxy proxy, Method method, Object[] args) argument
[all...]
/libcore/ojluni/src/main/java/sun/util/logging/
H A DLoggingSupport.java48 private static final LoggingProxy proxy = field in class:LoggingSupport
71 return proxy != null;
75 if (proxy == null)
81 return proxy.getLoggerNames();
85 return proxy.getLoggerLevel(loggerName);
90 proxy.setLoggerLevel(loggerName, levelName);
95 return proxy.getParentLoggerName(loggerName);
100 return proxy.getLogger(name);
105 return proxy.getLevel(logger);
110 proxy
[all...]
/libcore/luni/src/test/java/libcore/java/net/
H A DOldProxyTest.java28 Proxy proxy = new Proxy(Proxy.Type.SOCKS, address);
29 assertEquals(address, proxy.address());
61 Proxy proxy = new Proxy(Proxy.Type.HTTP, address);
62 assertEquals(Proxy.Type.HTTP, proxy.type());
64 proxy = new Proxy(Proxy.Type.SOCKS, address);
65 assertEquals(Proxy.Type.SOCKS, proxy.type());
67 proxy = Proxy.NO_PROXY;
68 assertEquals(Proxy.Type.DIRECT, proxy.type());
H A DFtpURLConnectionTest.java113 Proxy proxy = Proxy.NO_PROXY;
116 URLConnection connection = fileUrl.openConnection(proxy);
119 assertEquals(Proxy.Type.DIRECT, proxy.type());
131 Proxy proxy = countingProxy.asProxy();
132 assertEquals(Proxy.Type.HTTP, proxy.type());
133 SocketAddress address = proxy.address();
145 * Tests that a HTTP proxy explicitly passed to {@link URL#openConnection(Proxy)}
154 Proxy proxy = countingProxy.asProxy();
155 URLConnection connection = fileUrl.openConnection(proxy);
176 Proxy proxy
319 private final Proxy proxy; field in class:FtpURLConnectionTest.SingleProxySelector
322 SingleProxySelector(Proxy proxy) argument
375 private final Proxy proxy; field in class:FtpURLConnectionTest.CountingProxy
[all...]
H A DOldURLTest.java648 public URLConnection openConnection(URL arg0, Proxy proxy) argument
650 return super.openConnection(u, proxy);
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/reflect/
H A DProxyTest.java55 public Object invoke(Object proxy, Method method, Object[] args) argument
72 Class proxy = Proxy.getProxyClass(Support_Proxy_I1.class
76 proxy.getSuperclass() == Proxy.class);
78 .isProxyClass(proxy));
104 public Object invoke(Object proxy, Method method, Object[] args)
122 public Object invoke(Object proxy, Method method, Object[] args)
125 return new Boolean(proxy == args[0]);
142 Support_Proxy_I1 proxy = (Support_Proxy_I1) p;
143 assertTrue("Failed identity test ", proxy.equals(proxy));
[all...]
/libcore/luni/src/test/java/org/apache/harmony/luni/tests/internal/net/www/protocol/http/
H A DHttpURLConnectionTest.java108 request.toLowerCase().indexOf("proxy-authorization:") > 0;
122 // proxy port
128 * Creates proxy selector instance.
129 * Selector will return the proxy, only if the connection
132 * Address of the returned proxy will be localhost:proxy_port.
141 Proxy proxy = Proxy.NO_PROXY;
144 proxy = new Proxy(Proxy.Type.HTTP,
148 result.add(proxy);
183 * Test checks if the proxy specified in openConnection
189 MockServer proxy
[all...]
/libcore/luni/src/test/java/libcore/java/lang/reflect/
H A DProxyTest.java34 public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
40 * Make sure the proxy's class loader fails if it cannot see the class
64 Object proxy = Proxy.newProxyInstance(loaderA, interfacesA, invocationHandlerB);
65 assertEquals(loaderA, proxy.getClass().getClassLoader());
66 assertEquals("foo", proxy.getClass().getMethod("echo", String.class).invoke(proxy, "foo"));
249 @Override public Object invoke(Object proxy, Method method, Object[] args) {
262 @Override public Object invoke(Object proxy, Method method, Object[] args) {
272 @Override public Object invoke(Object proxy, Method method, Object[] args) {
282 @Override public Object invoke(Object proxy, Metho
395 invoke(Object proxy, Method method, Object[] args) argument
[all...]
H A DReflectionTest.java542 @Override public Object invoke(Object proxy, Method method, Object[] args) {
547 Object proxy = Proxy.newProxyInstance(getClass().getClassLoader(),
549 assertSetEquals(proxy.getClass().getMethod("foo").getExceptionTypes(),
551 assertSetEquals(proxy.getClass().getMethod("foo", Void.class).getExceptionTypes());
/libcore/support/src/test/java/tests/io/
H A DMockOs.java56 @Override public Object invoke(Object proxy, Method method, Object[] args)
62 return handler.invoke(proxy, method, args);
115 @Override public Object invoke(Object proxy, Method method, Object[] args) throws ErrnoException {
/libcore/ojluni/src/main/java/java/beans/
H A DPropertyChangeSupport.java111 PropertyChangeListenerProxy proxy =
114 addPropertyChangeListener(proxy.getPropertyName(),
115 proxy.getListener());
137 PropertyChangeListenerProxy proxy =
140 removePropertyChangeListener(proxy.getPropertyName(),
141 proxy.getListener());
163 * PropertyChangeListenerProxy proxy =
165 * if (proxy.getPropertyName().equals("foo")) {
166 * // proxy is a PropertyChangeListener which was associated
/libcore/luni/src/test/java/libcore/java/util/beans/
H A DPropertyChangeSupportTest.java196 PropertyChangeListenerProxy proxy = new PropertyChangeListenerProxy("a", listener);
197 support.addPropertyChangeListener("b", proxy);
199 // this proxy sets us up to receive 'b' events
205 // there's no more proxy on 'a'.
260 PropertyChangeListenerProxy proxy = (PropertyChangeListenerProxy) listener;
261 return proxy.getPropertyName() + " to " + describe(proxy.getListener());
/libcore/luni/src/test/java/libcore/javax/net/ssl/
H A DPSKKeyManagerProxy.java77 public final Object invoke(Object proxy, Method method, Object[] args) throws Throwable { argument
/libcore/ojluni/src/main/java/sun/net/ftp/impl/
H A DFtpClient.java58 private Proxy proxy; field in class:FtpClient
607 // the first place. Most likely because the proxy is doing
644 if (proxy != null) {
645 if (proxy.type() == Proxy.Type.SOCKS) {
650 return new Socket(proxy);
731 if (proxy != null && proxy.type() == Proxy.Type.SOCKS) {
900 proxy = p;
905 * Get the proxy of this FtpClient
912 return proxy;
[all...]
/libcore/luni/src/test/java/libcore/java/io/
H A DSerializationTest.java404 public Object invoke(Object proxy, Method method, Object[] args) { argument
410 // This was created by serializing a proxy referencing WasInterface when it was an
436 public Object invoke(Object proxy, Method method, Object[] args) { argument
442 // This was created by serializing a proxy referencing WasSerializableInvocationHandler when
/libcore/ojluni/src/main/java/java/net/
H A DSocket.java90 * Creates an unconnected socket, specifying the type of proxy, if any,
94 * is called with the proxy host address and port number
99 * a plain socket ignoring any other proxy configuration.</LI>
101 * will create a socket connecting through the specified SOCKS proxy
105 * @param proxy a {@link java.net.Proxy Proxy} object specifying what kind
107 * @throws IllegalArgumentException if the proxy is of an invalid type
110 * permission to connect to the proxy is
117 public Socket(Proxy proxy) { argument
119 if (proxy == null) {
122 Proxy p = proxy
[all...]
H A DURL.java997 * made through the specified proxy; Protocol handlers that do not
998 * support proxing will ignore the proxy parameter and make a
1004 * @param proxy the Proxy through which this connection
1011 * to the proxy.
1012 * @exception IllegalArgumentException will be thrown if proxy is null,
1013 * or proxy has the wrong type
1024 public URLConnection openConnection(Proxy proxy) argument
1026 if (proxy == null) {
1027 throw new IllegalArgumentException("proxy can not be null");
1031 Proxy p = proxy
[all...]
H A DSocksSocketImpl.java64 SocksSocketImpl(Proxy proxy) { argument
65 SocketAddress a = proxy.address();
136 * Provides the authentication machanism required by the proxy.
314 * connect to the SOCKS proxy and negotiate the access. If the proxy
351 * Android-changed: Removed code that tried to establish proxy connection if
/libcore/luni/src/main/java/libcore/reflect/
H A DAnnotationFactory.java34 * The annotation implementation based on dynamically generated proxy instances.
276 public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { argument

Completed in 612 milliseconds

12