Home
last modified time | relevance | path

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

12

/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/net/
DProxyTest.java33 Proxy proxy = new Proxy(Proxy.Type.HTTP, address); in test_ConstructorLjava_net_ProxyLjava_net_SocketAddress_Normal() local
34 assertEquals(Proxy.Type.HTTP, proxy.type()); in test_ConstructorLjava_net_ProxyLjava_net_SocketAddress_Normal()
35 assertEquals(address, proxy.address()); 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()
40 assertEquals(address, proxy.address()); 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()
45 assertNull(proxy.address()); in test_ConstructorLjava_net_ProxyLjava_net_SocketAddress_Normal()
52 Proxy proxy = null; in test_ConstructorLjava_net_ProxyLjava_net_SocketAddress_IllegalAddress() local
[all …]
DProxySelectorTest.java513 private void assertProxyEquals(List selectedProxyList, Proxy proxy) { in assertProxyEquals() argument
516 assertEquals((Proxy) selectedProxyList.get(0), proxy); in assertProxyEquals()
527 Proxy proxy = new Proxy(type, sa); in assertProxyEquals() local
528 assertProxyEquals(selectedProxyList, proxy); in assertProxyEquals()
DURLTest.java995 public URLConnection openConnection(URL arg0, Proxy proxy) in openConnection() argument
997 return super.openConnection(u, proxy); in openConnection()
/libcore/ojluni/src/main/java/sun/util/logging/
DLoggingSupport.java48 private static final LoggingProxy proxy = field in LoggingSupport
71 return proxy != null; in isAvailable()
75 if (proxy == null) in ensureAvailable()
81 return proxy.getLoggerNames(); in getLoggerNames()
85 return proxy.getLoggerLevel(loggerName); in getLoggerLevel()
90 proxy.setLoggerLevel(loggerName, levelName); in setLoggerLevel()
95 return proxy.getParentLoggerName(loggerName); in getParentLoggerName()
100 return proxy.getLogger(name); in getLogger()
105 return proxy.getLevel(logger); in getLevel()
110 proxy.setLevel(logger, newLevel); in setLevel()
[all …]
/libcore/luni/src/test/java/org/apache/harmony/luni/tests/internal/net/www/protocol/http/
DHttpURLConnectionTest.java141 Proxy proxy = Proxy.NO_PROXY; in select() local
144 proxy = new Proxy(Proxy.Type.HTTP, in select()
148 result.add(proxy); in select()
189 MockServer proxy = new MockServer("proxy"); in testUsingProxy() local
196 proxy.port()))); in testUsingProxy()
204 proxy.start(); in testUsingProxy()
206 if (!proxy.started) bound.wait(5000); in testUsingProxy()
213 proxy.join(); in testUsingProxy()
216 assertTrue("Proxy server was not used", proxy.accepted); in testUsingProxy()
229 MockServer proxy = new MockServer("proxy"); in testUsingProxySelector() local
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/reflect/
DProxyTest.java55 public Object invoke(Object proxy, Method method, Object[] args) in invoke() argument
72 Class proxy = Proxy.getProxyClass(Support_Proxy_I1.class in test_getProxyClassLjava_lang_ClassLoader$Ljava_lang_Class() local
76 proxy.getSuperclass() == Proxy.class); in test_getProxyClassLjava_lang_ClassLoader$Ljava_lang_Class()
78 .isProxyClass(proxy)); in test_getProxyClassLjava_lang_ClassLoader$Ljava_lang_Class()
104 public Object invoke(Object proxy, Method method, Object[] args) in test_ProxyLjava_lang_reflect_InvocationHandler()
122 public Object invoke(Object proxy, Method method, Object[] args) in test_newProxyInstanceLjava_lang_ClassLoader$Ljava_lang_ClassLjava_lang_reflect_InvocationHandler()
125 return new Boolean(proxy == args[0]); in test_newProxyInstanceLjava_lang_ClassLoader$Ljava_lang_ClassLjava_lang_reflect_InvocationHandler()
142 Support_Proxy_I1 proxy = (Support_Proxy_I1) p; in test_newProxyInstanceLjava_lang_ClassLoader$Ljava_lang_ClassLjava_lang_reflect_InvocationHandler() local
143 assertTrue("Failed identity test ", proxy.equals(proxy)); in test_newProxyInstanceLjava_lang_ClassLoader$Ljava_lang_ClassLjava_lang_reflect_InvocationHandler()
144 assertTrue("Failed not equals test ", !proxy.equals("")); in test_newProxyInstanceLjava_lang_ClassLoader$Ljava_lang_ClassLjava_lang_reflect_InvocationHandler()
[all …]
/libcore/ojluni/src/main/java/sun/net/
DApplicationProxy.java36 private ApplicationProxy(Proxy proxy) { in ApplicationProxy() argument
37 super(proxy.type(), proxy.address()); in ApplicationProxy()
40 public static ApplicationProxy create(Proxy proxy) { in create() argument
41 return new ApplicationProxy(proxy); in create()
DNetworkClient.java49 protected Proxy proxy = Proxy.NO_PROXY; field in NetworkClient
154 if (proxy != null) { in doConnect()
155 if (proxy.type() == Proxy.Type.SOCKS) { in doConnect()
159 return new Socket(proxy); in doConnect()
161 } else if (proxy.type() == Proxy.Type.DIRECT) { in doConnect()
/libcore/luni/src/test/java/libcore/java/net/
DOldProxyTest.java28 Proxy proxy = new Proxy(Proxy.Type.SOCKS, address); in test_address() local
29 assertEquals(address, proxy.address()); in test_address()
61 Proxy proxy = new Proxy(Proxy.Type.HTTP, address); in test_type() local
62 assertEquals(Proxy.Type.HTTP, proxy.type()); in test_type()
64 proxy = new Proxy(Proxy.Type.SOCKS, address); in test_type()
65 assertEquals(Proxy.Type.SOCKS, proxy.type()); in test_type()
67 proxy = Proxy.NO_PROXY; in test_type()
68 assertEquals(Proxy.Type.DIRECT, proxy.type()); in test_type()
DFtpURLConnectionTest.java139 Proxy proxy = Proxy.NO_PROXY; in testConnectOverProxy_noProxy() local
142 URLConnection connection = fileUrl.openConnection(proxy); in testConnectOverProxy_noProxy()
145 assertEquals(Proxy.Type.DIRECT, proxy.type()); in testConnectOverProxy_noProxy()
157 Proxy proxy = countingProxy.asProxy(); in testCountingProxy() local
158 assertEquals(Proxy.Type.HTTP, proxy.type()); in testCountingProxy()
159 SocketAddress address = proxy.address(); in testCountingProxy()
180 Proxy proxy = countingProxy.asProxy(); in testConnectOverProxy_explicit_http_uses_direct_connection() local
181 URLConnection connection = fileUrl.openConnection(proxy); in testConnectOverProxy_explicit_http_uses_direct_connection()
202 Proxy proxy = countingProxy.asProxy(); in testConnectOverProxy_implicit_http_fails() local
203 SingleProxySelector proxySelector = new SingleProxySelector(proxy); in testConnectOverProxy_implicit_http_fails()
[all …]
DOldURLTest.java648 public URLConnection openConnection(URL arg0, Proxy proxy) in openConnection() argument
650 return super.openConnection(u, proxy); in openConnection()
/libcore/luni/src/test/java/libcore/java/lang/reflect/
DProxyTest.java34 public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
64 Object proxy = Proxy.newProxyInstance(loaderA, interfacesA, invocationHandlerB); in testClassLoaderDoesNotNeedToSeeInvocationHandlerLoader() local
65 assertEquals(loaderA, proxy.getClass().getClassLoader()); in testClassLoaderDoesNotNeedToSeeInvocationHandlerLoader()
66 assertEquals("foo", proxy.getClass().getMethod("echo", String.class).invoke(proxy, "foo")); in testClassLoaderDoesNotNeedToSeeInvocationHandlerLoader()
249 @Override public Object invoke(Object proxy, Method method, Object[] args) { in testEquals()
262 @Override public Object invoke(Object proxy, Method method, Object[] args) { in testHashCode()
272 @Override public Object invoke(Object proxy, Method method, Object[] args) { in testToString()
282 @Override public Object invoke(Object proxy, Method method, Object[] args) { in testReturnTypeDoesNotSatisfyAllConstraintsWithLenientCaller()
294 @Override public Object invoke(Object proxy, Method method, Object[] args) { in testReturnTypeDoesNotSatisfyAllConstraintsWithStrictCaller()
395 public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { in invoke() argument
[all …]
DReflectionTest.java542 @Override public Object invoke(Object proxy, Method method, Object[] args) { in testProxyMethodGetExceptions()
547 Object proxy = Proxy.newProxyInstance(getClass().getClassLoader(), in testProxyMethodGetExceptions() local
549 assertSetEquals(proxy.getClass().getMethod("foo").getExceptionTypes(), in testProxyMethodGetExceptions()
551 assertSetEquals(proxy.getClass().getMethod("foo", Void.class).getExceptionTypes()); in testProxyMethodGetExceptions()
/libcore/ojluni/src/main/java/java/beans/
DPropertyChangeSupport.java111 PropertyChangeListenerProxy proxy = in addPropertyChangeListener() local
114 addPropertyChangeListener(proxy.getPropertyName(), in addPropertyChangeListener()
115 proxy.getListener()); in addPropertyChangeListener()
137 PropertyChangeListenerProxy proxy = in removePropertyChangeListener() local
140 removePropertyChangeListener(proxy.getPropertyName(), in removePropertyChangeListener()
141 proxy.getListener()); in removePropertyChangeListener()
/libcore/support/src/test/java/tests/io/
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 { in enqueueFault()
/libcore/luni/src/test/java/libcore/java/util/beans/
DPropertyChangeSupportTest.java196 PropertyChangeListenerProxy proxy = new PropertyChangeListenerProxy("a", listener); in testAddingAProxy() local
197 support.addPropertyChangeListener("b", proxy); in testAddingAProxy()
260 PropertyChangeListenerProxy proxy = (PropertyChangeListenerProxy) listener; in describe() local
261 return proxy.getPropertyName() + " to " + describe(proxy.getListener()); in describe()
/libcore/ojluni/src/main/java/java/lang/reflect/
DInvocationHandler.java93 public Object invoke(Object proxy, Method method, Object[] args) in invoke() argument
DProxy.java885 public static InvocationHandler getInvocationHandler(Object proxy) in getInvocationHandler() argument
891 if (!isProxyClass(proxy.getClass())) { in getInvocationHandler()
895 final Proxy p = (Proxy) proxy; in getInvocationHandler()
911 private static Object invoke(Proxy proxy, Method method, Object[] args) throws Throwable { in invoke() argument
912 InvocationHandler h = proxy.h; in invoke()
913 return h.invoke(proxy, method, args); in invoke()
/libcore/ojluni/src/main/java/sun/net/ftp/impl/
DFtpClient.java57 private Proxy proxy; field in FtpClient
643 if (proxy != null) { in openPassiveDataConnection()
644 if (proxy.type() == Proxy.Type.SOCKS) { in openPassiveDataConnection()
649 return new Socket(proxy); in openPassiveDataConnection()
729 if (proxy != null && proxy.type() == Proxy.Type.SOCKS) { in openDataConnection()
899 proxy = p; in setProxy()
911 return proxy; in getProxy()
936 if (proxy != null) { in doConnect()
937 if (proxy.type() == Proxy.Type.SOCKS) { in doConnect()
942 return new Socket(proxy); in doConnect()
/libcore/luni/src/test/java/libcore/java/io/
DSerializationTest.java404 public Object invoke(Object proxy, Method method, Object[] args) { in invoke() argument
436 public Object invoke(Object proxy, Method method, Object[] args) { in invoke() argument
/libcore/ojluni/src/main/java/java/net/
DURL.java1024 public URLConnection openConnection(Proxy proxy) in openConnection() argument
1026 if (proxy == null) { in openConnection()
1031 Proxy p = proxy == Proxy.NO_PROXY ? Proxy.NO_PROXY : sun.net.ApplicationProxy.create(proxy); in openConnection()
DSocket.java117 public Socket(Proxy proxy) { in Socket() argument
119 if (proxy == null) { in Socket()
122 Proxy p = proxy == Proxy.NO_PROXY ? Proxy.NO_PROXY in Socket()
123 : sun.net.ApplicationProxy.create(proxy); in Socket()
DSocksSocketImpl.java64 SocksSocketImpl(Proxy proxy) { in SocksSocketImpl() argument
65 SocketAddress a = proxy.address(); in SocksSocketImpl()
/libcore/luni/src/test/java/libcore/javax/net/ssl/
DPSKKeyManagerProxy.java77 public final Object invoke(Object proxy, Method method, Object[] args) throws Throwable { in invoke() argument
/libcore/luni/src/main/java/libcore/reflect/
DAnnotationFactory.java276 public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { in invoke() argument

12