/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/net/ |
D | ProxyTest.java | 19 import java.net.Proxy; 33 Proxy proxy = new Proxy(Proxy.Type.HTTP, address); in test_ConstructorLjava_net_ProxyLjava_net_SocketAddress_Normal() 34 assertEquals(Proxy.Type.HTTP, proxy.type()); in test_ConstructorLjava_net_ProxyLjava_net_SocketAddress_Normal() 38 proxy = new Proxy(Proxy.Type.SOCKS, address); in test_ConstructorLjava_net_ProxyLjava_net_SocketAddress_Normal() 39 assertEquals(Proxy.Type.SOCKS, proxy.type()); in test_ConstructorLjava_net_ProxyLjava_net_SocketAddress_Normal() 43 proxy = Proxy.NO_PROXY; in test_ConstructorLjava_net_ProxyLjava_net_SocketAddress_Normal() 44 assertEquals(Proxy.Type.DIRECT, proxy.type()); in test_ConstructorLjava_net_ProxyLjava_net_SocketAddress_Normal() 52 Proxy proxy = null; in test_ConstructorLjava_net_ProxyLjava_net_SocketAddress_IllegalAddress() 55 proxy = new Proxy(Proxy.Type.HTTP, null); in test_ConstructorLjava_net_ProxyLjava_net_SocketAddress_IllegalAddress() 62 proxy = new Proxy(Proxy.Type.SOCKS, null); in test_ConstructorLjava_net_ProxyLjava_net_SocketAddress_IllegalAddress() [all …]
|
D | ProxySelectorTest.java | 21 import java.net.Proxy; 114 assertProxyEquals(proxyList, Proxy.NO_PROXY); in test_selectLjava_net_URI_SelectExact() 130 assertProxyEquals(proxyList, Proxy.Type.HTTP, HTTP_PROXY_HOST, HTTP_PROXY_PORT); in test_selectLjava_net_URI_SelectExact() 133 assertProxyEquals(proxyList, Proxy.Type.HTTP, HTTPS_PROXY_HOST, HTTPS_PROXY_PORT); in test_selectLjava_net_URI_SelectExact() 136 assertProxyEquals(proxyList, Proxy.Type.HTTP, FTP_PROXY_HOST, FTP_PROXY_PORT); in test_selectLjava_net_URI_SelectExact() 139 assertProxyEquals(proxyList, Proxy.Type.SOCKS, SOCKS_PROXY_HOST, SOCKS_PROXY_PORT); in test_selectLjava_net_URI_SelectExact() 155 assertProxyEquals(proxyList, Proxy.NO_PROXY); in test_selectLjava_net_URI_SelectExact_NullHost() 171 assertProxyEquals(proxyList, Proxy.Type.HTTP, HTTP_PROXY_HOST, in test_selectLjava_net_URI_SelectExact_NullHost() 175 assertProxyEquals(proxyList, Proxy.Type.HTTP, HTTPS_PROXY_HOST, in test_selectLjava_net_URI_SelectExact_NullHost() 179 assertProxyEquals(proxyList, Proxy.Type.HTTP, FTP_PROXY_HOST, in test_selectLjava_net_URI_SelectExact_NullHost() [all …]
|
/libcore/luni/src/test/java/libcore/java/net/ |
D | OldProxyTest.java | 19 import java.net.Proxy; 28 Proxy proxy = new Proxy(Proxy.Type.SOCKS, address); in test_address() 32 new Proxy(Proxy.Type.SOCKS, null); in test_address() 42 Proxy proxy1 = new Proxy(Proxy.Type.HTTP, address1); in test_hashCode() 43 Proxy proxy2 = new Proxy(Proxy.Type.HTTP, address1); in test_hashCode() 46 new Proxy(Proxy.Type.SOCKS, address1); in test_hashCode() 47 Proxy proxy4 = new Proxy(Proxy.Type.SOCKS, address1); in test_hashCode() 54 Proxy proxy5 = new Proxy(Proxy.Type.SOCKS, address1); in test_hashCode() 55 Proxy proxy6 = new Proxy(Proxy.Type.SOCKS, address2); in test_hashCode() 61 Proxy proxy = new Proxy(Proxy.Type.HTTP, address); in test_type() [all …]
|
D | ProxySelectorTest.java | 20 import java.net.Proxy; 66 assertEquals(Arrays.asList(Proxy.NO_PROXY), proxySelector.select(ftpUri)); in testNoProxySystemProperty() 67 assertEquals(Arrays.asList(Proxy.NO_PROXY), proxySelector.select(httpUri)); in testNoProxySystemProperty() 68 assertEquals(Arrays.asList(Proxy.NO_PROXY), proxySelector.select(httpsUri)); in testNoProxySystemProperty() 69 assertEquals(Arrays.asList(Proxy.NO_PROXY), proxySelector.select(socketUri)); in testNoProxySystemProperty() 70 assertEquals(Arrays.asList(Proxy.NO_PROXY), proxySelector.select(otherUri)); in testNoProxySystemProperty() 79 assertEquals(Arrays.asList(new Proxy(Proxy.Type.HTTP, createUnresolved("a", 80))), in testProxyHostOnly() 81 assertEquals(Arrays.asList(new Proxy(Proxy.Type.HTTP, createUnresolved("b", 80))), in testProxyHostOnly() 83 assertEquals(Arrays.asList(new Proxy(Proxy.Type.HTTP, createUnresolved("c", 443))), in testProxyHostOnly() 85 assertEquals(Arrays.asList(Proxy.NO_PROXY), proxySelector.select(otherUri)); in testProxyHostOnly() [all …]
|
D | FtpURLConnectionTest.java | 32 import java.net.Proxy; 139 Proxy proxy = Proxy.NO_PROXY; in testConnectOverProxy_noProxy() 145 assertEquals(Proxy.Type.DIRECT, proxy.type()); in testConnectOverProxy_noProxy() 157 Proxy proxy = countingProxy.asProxy(); in testCountingProxy() 158 assertEquals(Proxy.Type.HTTP, proxy.type()); in testCountingProxy() 180 Proxy proxy = countingProxy.asProxy(); in testConnectOverProxy_explicit_http_uses_direct_connection() 202 Proxy proxy = countingProxy.asProxy(); in testConnectOverProxy_implicit_http_fails() 242 SingleProxySelector proxySelector = new SingleProxySelector(Proxy.NO_PROXY); in testInputUrlWithSpacesViaProxySelector() 332 private final Proxy proxy; 335 public SingleProxySelector(Proxy proxy) { in SingleProxySelector() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/reflect/ |
D | ProxyTest.java | 27 import java.lang.reflect.Proxy; 61 class ProxyCoonstructorTest extends Proxy { 72 Class proxy = Proxy.getProxyClass(Support_Proxy_I1.class in test_getProxyClassLjava_lang_ClassLoader$Ljava_lang_Class() 76 proxy.getSuperclass() == Proxy.class); in test_getProxyClassLjava_lang_ClassLoader$Ljava_lang_Class() 77 assertTrue("Does not believe its a Proxy class ", Proxy in test_getProxyClassLjava_lang_ClassLoader$Ljava_lang_Class() 80 assertTrue("Does not believe it's a Proxy class ", Proxy in test_getProxyClassLjava_lang_ClassLoader$Ljava_lang_Class() 81 .isProxyClass(Proxy.getProxyClass(null, in test_getProxyClassLjava_lang_ClassLoader$Ljava_lang_Class() 85 Proxy.getProxyClass(Support_Proxy_I1.class.getClassLoader(), in test_getProxyClassLjava_lang_ClassLoader$Ljava_lang_Class() 92 Proxy.getProxyClass(Support_Proxy_I1.class.getClassLoader(), in test_getProxyClassLjava_lang_ClassLoader$Ljava_lang_Class() 119 Object p = Proxy.newProxyInstance(Support_Proxy_I1.class in test_newProxyInstanceLjava_lang_ClassLoader$Ljava_lang_ClassLjava_lang_reflect_InvocationHandler() [all …]
|
/libcore/ojluni/src/main/java/java/net/ |
D | Proxy.java | 38 public class Proxy { class 72 public final static Proxy NO_PROXY = new Proxy(); 75 private Proxy() { in Proxy() method in Proxy 93 public Proxy(Type type, SocketAddress sa) { in Proxy() method in Proxy 149 if (obj == null || !(obj instanceof Proxy)) in equals() 151 Proxy p = (Proxy) obj; in equals()
|
D | Socket.java | 117 public Socket(Proxy proxy) { in Socket() 122 Proxy p = proxy == Proxy.NO_PROXY ? Proxy.NO_PROXY in Socket() 124 Proxy.Type type = p.type(); in Socket() 127 if (type == Proxy.Type.SOCKS) { in Socket() 148 if (p == Proxy.NO_PROXY) { in Socket()
|
D | ProxySelector.java | 146 public abstract List<Proxy> select(URI uri); in select()
|
/libcore/luni/src/test/java/libcore/java/lang/reflect/ |
D | ProxyTest.java | 24 import java.lang.reflect.Proxy; 50 Proxy.newProxyInstance(loaderB, interfacesA, returnHandler); in testClassLoaderMustSeeImplementedInterfaces() 64 Object proxy = Proxy.newProxyInstance(loaderA, interfacesA, invocationHandlerB); in testClassLoaderDoesNotNeedToSeeInvocationHandlerLoader() 71 Proxy.newProxyInstance(loader, new Class[] {ReturnsInt.class, ReturnsFloat.class}, in testIncompatibleReturnTypesPrimitiveAndPrimitive() 80 Proxy.newProxyInstance(loader, new Class[] {ReturnsInt.class, ReturnsInteger.class}, in testIncompatibleReturnTypesPrimitiveAndWrapper() 89 Proxy.newProxyInstance(loader, new Class[] {ReturnsInt.class, ReturnsVoid.class}, in testIncompatibleReturnTypesPrimitiveAndVoid() 98 Proxy.newProxyInstance(loader, new Class[] {ReturnsInteger.class, ReturnsString.class }, in testIncompatibleReturnTypesIncompatibleObjects() 106 Proxy.newProxyInstance(loader, new Class[] {ReturnsString.class, ReturnsCharSequence.class}, in testCompatibleReturnTypesImplementedInterface() 108 Proxy.newProxyInstance(loader, new Class[]{ReturnsObject.class, ReturnsCharSequence.class, in testCompatibleReturnTypesImplementedInterface() 110 Proxy.newProxyInstance(loader, new Class[]{ReturnsObject.class, ReturnsCharSequence.class, in testCompatibleReturnTypesImplementedInterface() [all …]
|
/libcore/ojluni/annotations/hiddenapi/java/net/ |
D | Proxy.java | 31 public class Proxy { class 34 private Proxy() { in Proxy() method in Proxy 38 public Proxy(java.net.Proxy.Type type, java.net.SocketAddress sa) { in Proxy() method in Proxy 42 public java.net.Proxy.Type type() { in type() 62 public static final java.net.Proxy NO_PROXY; 70 private java.net.Proxy.Type type;
|
/libcore/ojluni/src/main/java/sun/net/ |
D | ApplicationProxy.java | 28 import java.net.Proxy; 35 public final class ApplicationProxy extends Proxy { 36 private ApplicationProxy(Proxy proxy) { in ApplicationProxy() 40 public static ApplicationProxy create(Proxy proxy) { in create()
|
D | SocksProxy.java | 28 import java.net.Proxy; 34 public final class SocksProxy extends Proxy { 38 super(Proxy.Type.SOCKS, addr); in SocksProxy()
|
D | NetworkClient.java | 32 import java.net.Proxy; 49 protected Proxy proxy = Proxy.NO_PROXY; 155 if (proxy.type() == Proxy.Type.SOCKS) { in doConnect() 161 } else if (proxy.type() == Proxy.Type.DIRECT) { in doConnect() 166 s = new Socket(Proxy.NO_PROXY); in doConnect()
|
/libcore/luni/src/test/java/org/apache/harmony/luni/tests/internal/net/www/protocol/http/ |
D | HttpURLConnectionTest.java | 25 import java.net.Proxy; 140 public java.util.List<Proxy> select(URI uri) { in select() 141 Proxy proxy = Proxy.NO_PROXY; in select() 144 proxy = new Proxy(Proxy.Type.HTTP, in select() 147 ArrayList<Proxy> result = new ArrayList<Proxy>(); in select() 194 .openConnection(new Proxy(Proxy.Type.HTTP, in testUsingProxy() 218 HttpURLConnection huc = (HttpURLConnection)url.openConnection(Proxy.NO_PROXY); in testUsingProxy() 288 new Proxy(Proxy.Type.HTTP, in testProxyAuthorization()
|
/libcore/ojluni/src/main/java/sun/net/spi/ |
D | DefaultProxySelector.java | 30 import java.net.Proxy; 154 public java.util.List<Proxy> select(URI uri) { in select() 187 List<Proxy> proxyl = new ArrayList<Proxy>(1); in select() 218 Proxy p = AccessController.doPrivileged( in select() 219 new PrivilegedAction<Proxy>() { in select() 220 public Proxy run() { in select() 260 return Proxy.NO_PROXY; in select() 288 return Proxy.NO_PROXY; in select() 321 return new Proxy(Proxy.Type.HTTP, saddr); in select() 325 return Proxy.NO_PROXY; in select()
|
/libcore/ojluni/src/main/java/sun/net/www/protocol/ftp/ |
D | Handler.java | 33 import java.net.Proxy; 55 protected java.net.URLConnection openConnection(URL u, Proxy p) in openConnection()
|
D | FtpURLConnection.java | 45 import java.net.Proxy; 90 private Proxy instProxy; 179 FtpURLConnection(URL url, Proxy p) throws IOException { in FtpURLConnection() 230 Proxy p = null; in connect() 243 Iterator<Proxy> it = sel.select(uri).iterator(); in connect() 246 if (p == null || p == Proxy.NO_PROXY || in connect() 247 p.type() == Proxy.Type.SOCKS) { in connect() 250 if (p.type() != Proxy.Type.HTTP || in connect()
|
/libcore/luni/src/test/java/org/apache/harmony/luni/tests/internal/net/www/protocol/https/ |
D | HttpsURLConnectionTest.java | 37 import java.net.Proxy; 410 url.openConnection(new Proxy(Proxy.Type.HTTP, proxyAddress)); in testProxyConnection() 459 url.openConnection(new Proxy(Proxy.Type.HTTP, proxyAddress)); in testProxyAuthConnection() 493 url.openConnection(new Proxy(Proxy.Type.HTTP, proxyAddress)); in testConsequentProxyConnection() 508 new Proxy(Proxy.Type.HTTP, proxyAddress2)); in testConsequentProxyConnection() 565 proxyUrl.openConnection(new Proxy(Proxy.Type.HTTP, proxyAddress)); in testProxyAuthConnection_doOutput() 601 url.openConnection(new Proxy(Proxy.Type.HTTP, proxyAddress)); in testProxyAuthConnectionFailed() 643 url.openConnection(new Proxy(Proxy.Type.HTTP, proxyAddress)); in testProxyConnection_Not_Found_Response()
|
/libcore/ojluni/src/main/java/sun/reflect/misc/ |
D | ReflectUtil.java | 31 import java.lang.reflect.Proxy; 211 if (Proxy.isProxyClass(clazz)) { in checkProxyPackageAccess() 262 return Proxy.isProxyClass(cls) && !pkg.isEmpty(); in isNonPublicProxyClass()
|
/libcore/ojluni/annotations/sdk/nullability/java/lang/reflect/ |
D | Proxy.annotated.java | 33 public class Proxy implements java.io.Serializable { class 35 protected Proxy(@libcore.util.NonNull java.lang.reflect.InvocationHandler h) { throw new RuntimeExc… in Proxy() method in Proxy
|
/libcore/ojluni/src/main/java/java/lang/reflect/ |
D | Proxy.java | 239 public class Proxy implements java.io.Serializable { class 262 private Proxy() { in Proxy() method in Proxy 275 protected Proxy(InvocationHandler h) { in Proxy() method in Proxy 957 return Proxy.class.isAssignableFrom(cl) && proxyClassCache.containsValue(cl); in isProxyClass() 985 final Proxy p = (Proxy) proxy; in getInvocationHandler() 1004 private static Object invoke(Proxy proxy, Method method, Object[] args) throws Throwable { in invoke()
|
/libcore/ojluni/annotations/hiddenapi/java/lang/reflect/ |
D | Proxy.java | 32 public class Proxy implements java.io.Serializable { class 34 private Proxy() { in Proxy() method in Proxy 38 protected Proxy(java.lang.reflect.InvocationHandler h) { in Proxy() method in Proxy 103 java.lang.reflect.Proxy proxy, java.lang.reflect.Method method, java.lang.Object[] args) in invoke()
|
/libcore/luni/src/main/java/libcore/reflect/ |
D | AnnotationFactory.java | 27 import java.lang.reflect.Proxy; 95 return (A) Proxy.newProxyInstance(annotationType.getClassLoader(), in createAnnotation() 185 if (Proxy.isProxyClass(obj.getClass()) in equals() 186 && (handler = Proxy.getInvocationHandler(obj)) instanceof AnnotationFactory) { in equals()
|
/libcore/ojluni/src/main/java/sun/net/www/protocol/file/ |
D | Handler.java | 31 import java.net.Proxy; 75 public synchronized URLConnection openConnection(URL u, Proxy p) in openConnection()
|