Package com.volantis.shared.net.proxy

Examples of com.volantis.shared.net.proxy.ProxyManager


        Proxy replaced = null;
        if (proxy != null) {
            replaced = (Proxy)proxies.put(proxy.getId(), proxy);

            // Create a ProxyManagerAdapter around an old style Proxy.
            ProxyManager manager = new ProxyManagerAdapter(proxy);

            // Store the manager with the specified id.
            proxyManagers.put(proxy.getId(), manager);
        }
View Full Code Here


            throws HTTPException {

        // use system properties if available otherwise use proxy settings
        // from configuration file.
        ProxyFactory factory = ProxyFactory.getDefaultInstance();
        ProxyManager manager = factory.getSystemProxyManager();
        if (manager == null) {
            // First see if a proxy has been specified.
            String proxyRef = (String) context.getProperty(ProxyManager.class);
            if (proxyRef != null) {
                // Now look for the referenced proxy in the configuration.
View Full Code Here

                    createHTTPMessageEntities();

            // If redirection occurs this will reference the location of the
            // redirect URL
            String urlToFollow = request.getUrl();
            ProxyManager proxyManager = retrieveProxyManager(xmlPipelineContext);
            HTTPResponseAccessor responseAccessor;
            // used to store urls that I've been redirected too. This
            // can be probed to check for cyclic redirects.
            Set redirectCycles = new HashSet();
            do {
View Full Code Here

                HTTPSystemPropertyKeys.HTTP_PROXY_HOST, "").returns(" ");
        systemPropertiesMock.expects.getProperty(
                HTTPSystemPropertyKeys.PROXY_HOST, "").returns(" ");

        ProxyFactory factory = new ProxyFactoryImpl(systemPropertiesMock);
        ProxyManager manager = factory.getSystemProxyManager();
        assertNull(manager);
    }
View Full Code Here

        // Ensure that when the host is specified a system proxy is created.
        addHTTPPropertyExpectations("foobar", "99", "me", "mine",
                "*.volantis.com|www.google.com");

        ProxyFactory factory = new ProxyFactoryImpl(systemPropertiesMock);
        ProxyManager manager = factory.getSystemProxyManager();

        Proxy proxy = manager.getProxyForHost("www.google.com2");
        assertNotNull(proxy);
        checkProxy(proxy, "foobar", 99, "me", "mine");

        assertNull(manager.getProxyForHost("www.volantis.com"));
        assertNull(manager.getProxyForHost("foo.volantis.com"));
        assertNull(manager.getProxyForHost("www.google.com"));
    }
View Full Code Here

TOP

Related Classes of com.volantis.shared.net.proxy.ProxyManager

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.