Code examples for Proxy

Codota analyzed 7,668,838 open source code samples to find the most common, credible and clear examples.
You can now enable Codota on your own code to easily search and navigate your Java codebase.
69:	assertEquals(type, result.type()); 
70:	InetSocketAddress address = (InetSocketAddress) result.address(); 
Full Snippet Info
7
CodeRank
83:	return (proxy != null && proxy.type() != Proxy.Type.DIRECT) 
84:	? ((InetSocketAddress) proxy.address()).getAddress() 
Full Snippet Info
7
CodeRank
155:	new Proxy(Proxy.Type.SOCKS, InetSocketAddress.createUnresolved(host, 
Full Snippet Info
7
CodeRank
111:	Proxy proxy = new Proxy(Proxy.Type.HTTP, address); 
-
113:	assertTrue(proxy.toString().indexOf(proxy.type().toString()) != -1); 
-
115:	assertTrue(proxy.toString().indexOf(proxy.address().toString()) != -1); 
Full Snippet Info
6
CodeRank
73:	this.proxy = new Proxy(type, socketAddress); 
Full Snippet Info
6
CodeRank
84:	assertEquals(Arrays.asList(new Proxy(Proxy.Type.HTTP, createUnresolved("b", 80))), 
Full Snippet Info
6
CodeRank
81:	target.openConnection(new Proxy(Proxy.Type.HTTP, new InetSocketAddress("127.0.0.1", port))); 
Full Snippet Info
6
CodeRank
90:	return address.sslSocketFactory != null && proxy.type() == Proxy.Type.HTTP; 
Full Snippet Info
6
CodeRank
24:	InetSocketAddress.createUnresolved(proxyHost, proxyPort))); 
Full Snippet Info
6
CodeRank
64:	proxy = new Proxy(Proxy.Type.SOCKS, address); 
65:	assertEquals(Proxy.Type.SOCKS, proxy.type()); 
Full Snippet Info
6
CodeRank
92:	assertEquals(proxy.apply(uri), new Proxy(Proxy.Type.HTTP, new InetSocketAddress("proxy.example.com", 8080))); 
Full Snippet Info
6
CodeRank
201:	if (proxy.type() == Proxy.Type.DIRECT) { 
-
205:	SocketAddress proxyAddress = proxy.address(); 
Full Snippet Info
6
CodeRank
34:	list.add(proxy); 
-
46:	InetSocketAddress.createUnresolved(proxyHost, proxyPort))); 
Full Snippet Info
6
CodeRank
46:	Proxy.Type type = proxy.type(); 
-
48:	case HTTP: return "PROXY " + proxy.address().toString(); 
49:	case SOCKS: return "SOCKS5 " + proxy.address().toString(); 
Full Snippet Info
6
CodeRank
81:	assertEquals(Arrays.asList(new Proxy(Proxy.Type.HTTP, createUnresolved("b", 80))), 
Full Snippet Info
6
CodeRank
61:	Proxy proxy = new Proxy(Proxy.Type.HTTP, address); 
62:	assertEquals(Proxy.Type.HTTP, proxy.type()); 
Full Snippet Info
5
CodeRank
34:	public static FixedProxySelector parseProxySettings(String proxyVar) { 
-
46:	} 
Full Snippet Info
6
CodeRank
64:	new Proxy(Proxy.Type.HTTP, new InetSocketAddress(proxyAHost, proxyAPort)); 
Full Snippet Info
6
CodeRank
461:	return proxy != null && proxy.type() != Proxy.Type.DIRECT; 
Full Snippet Info
5
CodeRank
155:	new Proxy(Proxy.Type.SOCKS, InetSocketAddress.createUnresolved(host, 
Full Snippet Info
5
CodeRank