Examples of HttpProxy


Examples of org.eclipse.jetty.client.HttpProxy

            final Object proxyUri = config.getProperties().get(ClientProperties.PROXY_URI);
            if (proxyUri != null) {
                final URI u = getProxyUri(proxyUri);
                final ProxyConfiguration proxyConfig = client.getProxyConfiguration();
                proxyConfig.getProxies().add(new HttpProxy(u.getHost(), u.getPort()));
            }

            if (disableCookies) {
                client.setCookieStore(new HttpCookieStore.Empty());
            }
View Full Code Here

Examples of org.eclipse.jetty.client.HttpProxy

        ServletContextHandler context = new ServletContextHandler(proxy, "/", ServletContextHandler.SESSIONS);
        ServletHolder proxyServlet = new ServletHolder(ProxyServlet.class);
        context.addServlet(proxyServlet, "/*");

        proxy.start();
        httpClient.getProxyConfiguration().getProxies().add(new HttpProxy("localhost", proxyConnector.getLocalPort()));

        testClient(newBayeuxClient());
    }
View Full Code Here

Examples of org.eclipse.jetty.client.HttpProxy

        proxy.setHandler(connectHandler);

        proxy.start();
        httpClient.stop();
        httpClient = new HttpClient(sslContextFactory);
        httpClient.getProxyConfiguration().getProxies().add(new HttpProxy("localhost", proxyConnector.getLocalPort()));
        httpClient.start();

        String url = "https://localhost:" + sslConnector.getLocalPort() + cometdServletPath;
        BayeuxClient client = new BayeuxClient(url, new LongPollingTransport(null, httpClient));
        testClient(client);
View Full Code Here

Examples of org.mockserver.proxy.http.HttpProxy

    private final static int serverSecurePort = PortFactory.findFreePort();

    @Test
    public void canStartAndStopMultipleTimes() {
        // start server
        HttpProxy httpProxy = new HttpProxyBuilder().withHTTPPort(serverPort).withHTTPSPort(serverSecurePort).build();

        // start client
        ProxyClient proxyClient = new ProxyClient("localhost", serverPort);

        for (int i = 0; i < 2; i++) {
            // when
            proxyClient.stop();

            // then
            assertFalse(httpProxy.isRunning());
            httpProxy = new HttpProxyBuilder().withHTTPPort(serverPort).withHTTPSPort(serverSecurePort).build();
            assertTrue(httpProxy.isRunning());
        }

        assertTrue(httpProxy.isRunning());
        httpProxy.stop();
        assertFalse(httpProxy.isRunning());
    }
View Full Code Here

Examples of org.mockserver.proxy.http.HttpProxy

    }

    @Test
    public void canStartAndStopMultipleTimesWithNewProcess() {
        // start server
        HttpProxy httpProxy = new HttpProxyBuilder().withHTTPPort(serverPort).withHTTPSPort(serverSecurePort).build();

        // start client
        MockServerClient mockServerClient = new MockServerClient("localhost", serverPort);

        for (int i = 0; i < 2; i++) {
            // when
            mockServerClient.stop();

            // then
            assertFalse(httpProxy.isRunning());
            httpProxy = new HttpProxyBuilder().withHTTPPort(serverPort).withHTTPSPort(serverSecurePort).build();
            assertTrue(httpProxy.isRunning());
        }

        assertTrue(httpProxy.isRunning());
        httpProxy.stop();
        assertFalse(httpProxy.isRunning());
    }
View Full Code Here

Examples of org.mule.transport.http.construct.HttpProxy

    }

    @Override
    protected HttpProxy buildFlowConstruct(final MuleContext muleContext) throws MuleException
    {
        return new HttpProxy(name, muleContext, getOrBuildInboundEndpoint(muleContext),
            getOrBuildOutboundEndpoint(muleContext), transformers, responseTransformers,
            cachingMessageProcessor);
    }
View Full Code Here

Examples of org.mule.transport.http.construct.HttpProxy

public class HttpProxyBuilderTestCase extends AbstractMuleTestCase
{
    public void testConfigurationNoCache() throws MuleException
    {
        final HttpProxy httpProxy = new HttpProxyBuilder().name("test-http-proxy-no-cache")
            .inboundAddress("test://foo")
            .outboundAddress("test://bar")
            .build(muleContext);

        assertEquals("test-http-proxy-no-cache", httpProxy.getName());
    }
View Full Code Here

Examples of org.mule.transport.http.construct.HttpProxy

    }

    @Override
    protected HttpProxy buildFlowConstruct(final MuleContext muleContext) throws MuleException
    {
        return new HttpProxy(name, muleContext, getOrBuildInboundEndpoint(muleContext),
            getOrBuildOutboundEndpoint(muleContext), transformers, responseTransformers,
            cachingStrategy);
    }
View Full Code Here

Examples of org.mule.transport.http.construct.HttpProxy

public class HttpProxyBuilderTestCase extends AbstractMuleContextTestCase
{
    @Test
    public void testConfigurationNoCache() throws MuleException
    {
        final HttpProxy httpProxy = new HttpProxyBuilder().name("test-http-proxy-no-cache")
            .inboundAddress("test://foo")
            .outboundAddress("test://bar")
            .build(muleContext);

        assertEquals("test-http-proxy-no-cache", httpProxy.getName());
    }
View Full Code Here

Examples of rabbit.proxy.HttpProxy

     * @param response the actual response being sent.
     */
    public AdFilter (Connection con, HttpHeader request, HttpHeader response) {
  super (con, request, response);
  int idx = -1
  HttpProxy proxy = con.getProxy ();
  adreplacer = proxy.getConfig ().getProperty (getClass ().getName (),
                 "adreplacer",
                 ADREPLACER);
  while ((idx = adreplacer.indexOf ("$proxy")) > -1) {
      adreplacer = adreplacer.substring(0,idx) +
    proxy.getHost ().getHostName () + ":" + proxy.getPort () +
    adreplacer.substring (idx + "$proxy".length ());
  }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.