APISonar


org.netbeans.installer.downloader.connector.MyProxyType.HTTP

> org > netbeans > installer > downloader > connector > MyProxyType > HTTP
org APIs netbeans APIs installer APIs downloader APIs connector APIs MyProxyType APIs HTTP APIs

Example 1
public void testSelectWithByPass() {
    MyProxySelector selector = new MyProxySelector();
    final MyProxy http = new MyProxy(new Proxy(Proxy.Type.HTTP, new InetSocketAddress("localhost", 8080)), MyProxyType.HTTP);
    selector.add(http);
    assertEquals(http.getProxy(), selector.select(httpURI).get(0));
    selector.addByPassHost(httpURI.getHost());
    assertEquals(Proxy.NO_PROXY, selector.select(httpURI).get(0));
  }
Example 2
public void testMyOwnProxyAdd() {
    URLConnector connector = new URLConnector(MyTestCase.testWD);
    MyProxy http = new MyProxy(new Proxy(Proxy.Type.HTTP, new InetSocketAddress("www.mpotstava.danilahttp", 1234)));
    MyProxy ftp = new MyProxy(new Proxy(Proxy.Type.SOCKS, new InetSocketAddress("www.mpotstava.danilaftp", 1234)), MyProxyType.FTP);
    MyProxy socks = new MyProxy(new Proxy(Proxy.Type.SOCKS, new InetSocketAddress("www.mpotstava.danilasocks", 1234)));
    connector.addProxy(http);
    connector.addProxy(ftp);
    connector.addProxy(socks);
    assertEquals(http.getProxy(), connector.getProxy(MyProxyType.HTTP));
    assertEquals(ftp.getProxy(), connector.getProxy(MyProxyType.FTP));
    assertEquals(socks.getProxy(), connector.getProxy(MyProxyType.SOCKS));
  }
Example 3
public void testSystemProxyCatched() {
    URLConnector connector = new URLConnector(MyTestCase.testWD);
    assertEquals(deploymentProxy, connector.getProxy(MyProxyType.HTTP));
    assertEquals(ftpPro, connector.getProxy(MyProxyType.FTP));
    assertEquals(socksPro, connector.getProxy(MyProxyType.SOCKS));
  }