Package java.net

Examples of java.net.Proxy


        }
    }   
   
    private HttpURLConnection createConnection(Message message, URI uri, HTTPClientPolicy csPolicy) throws IOException {
        URL url = uri.toURL();
        Proxy proxy = proxyFactory.createProxy(csPolicy , uri);
        message.put("http.scheme", uri.getScheme());
        return connectionFactory.createConnection(tlsClientParameters, proxy, url);
    }
View Full Code Here


       
        // Set socket timeout
        e.getParams().setParameter(CoreConnectionPNames.SO_TIMEOUT,
                Integer.valueOf((int) csPolicy.getReceiveTimeout()));
       
        Proxy p = proxyFactory.createProxy(csPolicy , uri);
        if (p != null) {
            InetSocketAddress isa = (InetSocketAddress)p.address();
            HttpHost proxy = new HttpHost(isa.getHostName(), isa.getPort());
            ConnRouteParams.setDefaultProxy(e.getParams(), proxy);
        }
        message.put(CXFHttpRequest.class, e);
    }
View Full Code Here

        return cookies.getSessionCookies();
    }
   
    private HttpURLConnection createConnection(Message message, URL url) throws IOException {
        HTTPClientPolicy csPolicy = getClient(message);
        Proxy proxy = proxyFactory.createProxy(csPolicy , url);
        return connectionFactory.createConnection(tlsClientParameters, proxy, url);
    }
View Full Code Here

     * Client Side Policy.
     *
     * @return The proxy server or null, if not set.
     */
    private Proxy getProxy(HTTPClientPolicy policy) {
        Proxy proxy = null;
        if (policy != null
            && policy.isSetProxyServer()
            && !StringUtils.isEmpty(policy.getProxyServer())) {
            proxy = new Proxy(
                    Proxy.Type.valueOf(policy.getProxyServerType().toString()),
                    new InetSocketAddress(policy.getProxyServer(),
                                          policy.getProxyServerPort()));
        }
        return proxy;
View Full Code Here

        return cookies.getSessionCookies();
    }
   
    private HttpURLConnection createConnection(Message message, URL url) throws IOException {
        HTTPClientPolicy csPolicy = getClient(message);
        Proxy proxy = proxyFactory.createProxy(csPolicy , url);
        return connectionFactory.createConnection(tlsClientParameters, proxy, url);
    }
View Full Code Here

    /**
     * Construct a new {@code Proxy} instance from the given policy.
     */
    private Proxy createProxy(final HTTPClientPolicy policy) {
        return new Proxy(Proxy.Type.valueOf(policy.getProxyServerType().toString()),
                         new InetSocketAddress(policy.getProxyServer(),
                                               policy.getProxyServerPort()));
    }
View Full Code Here

        return cookies.getSessionCookies();
    }
   
    private HttpURLConnection createConnection(Message message, URL url) throws IOException {
        HTTPClientPolicy csPolicy = getClient(message);
        Proxy proxy = proxyFactory.createProxy(csPolicy , url);
        return connectionFactory.createConnection(tlsClientParameters, proxy, url);
    }
View Full Code Here

       
        // Set socket timeout
        e.getParams().setParameter(CoreConnectionPNames.SO_TIMEOUT,
                Integer.valueOf((int) csPolicy.getReceiveTimeout()));
       
        Proxy p = proxyFactory.createProxy(csPolicy , uri);
        if (p != null && p.type() != Proxy.Type.DIRECT) {
            InetSocketAddress isa = (InetSocketAddress)p.address();
            HttpHost proxy = new HttpHost(isa.getHostName(), isa.getPort());
            ConnRouteParams.setDefaultProxy(e.getParams(), proxy);
        }
        message.put(CXFHttpRequest.class, e);
    }
View Full Code Here

        return cookies.getSessionCookies();
    }
   
    private HttpURLConnection createConnection(Message message, URL url) throws IOException {
        HTTPClientPolicy csPolicy = getClient(message);
        Proxy proxy = proxyFactory.createProxy(csPolicy , url);
        return connectionFactory.createConnection(tlsClientParameters, proxy, url);
    }
View Full Code Here

     * Client Side Policy.
     *
     * @return The proxy server or null, if not set.
     */
    private Proxy getProxy(HTTPClientPolicy policy) {
        Proxy proxy = null;
        if (policy != null
            && policy.isSetProxyServer()
            && !StringUtils.isEmpty(policy.getProxyServer())) {
            proxy = new Proxy(
                    Proxy.Type.valueOf(policy.getProxyServerType().toString()),
                    new InetSocketAddress(policy.getProxyServer(),
                                          policy.getProxyServerPort()));
        }
        return proxy;
View Full Code Here

TOP

Related Classes of java.net.Proxy

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.