Code example for Proxy

Methods: address

0
		List proxyList1 = selector.select(httpUri);
		assertNotNull(proxyList1);
		assertEquals(1, proxyList1.size());
		Proxy proxy1 = (Proxy) proxyList1.get(0);
		selector
				.connectFailed(httpUri, proxy1.address(), new SocketException());
 
		List proxyList2 = selector.select(httpUri);
		assertNotNull(proxyList2);
		assertEquals(1, proxyList2.size());
		Proxy proxy2 = (Proxy) proxyList2.get(0);
		// Default implementation doesn't change the proxy list 
		assertEquals(proxy1, proxy2);
	} 
 
	/** 
	 * @tests java.net.ProxySelector#select(URI) 
	 */ 
	public void test_connectionFailedLjava_net_URILjava_net_SocketAddressLjava_io_IOException_IllegalArguement() 
			throws URISyntaxException { 
		SocketAddress sa = InetSocketAddress.createUnresolved("127.0.0.1", 0);