Examples of ProxyBuilder


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

     */
    public SystemProxyManager(
            ProxyFactory factory,
            SystemProperties systemProperties) {
        this.systemProperties = systemProperties;
        ProxyBuilder builder = factory.createProxyBuilder();
        Proxy sysProxy = null;
        Pattern exHostRE = null;

        if (initialiseAddress(builder)) {
            builder.setUser(getSystemPropertyAsString(HTTPSystemPropertyKeys.PROXY_USER));
            builder.setPassword(getSystemPropertyAsString(HTTPSystemPropertyKeys.PROXY_PASSWORD));

            sysProxy = builder.buildProxy();

            // Get the list of hosts that do not require the use of a proxy. It is
            // in the form of a glob list, i.e. uses * for wildcard and | for
            // choices
            exHostRE = compileExcludedHostList();
View Full Code Here

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

    public ProxyManagerAdapter(Proxy proxy) {
        this.proxy = proxy;

        ProxyFactory factory = ProxyFactory.getDefaultInstance();

        ProxyBuilder builder = factory.createProxyBuilder();
        builder.setHost(proxy.getHost());
        builder.setPort(proxy.getPort());
        builder.setUser(proxy.getUser());
        builder.setPassword(proxy.getPassword());
        this.newProxy = builder.buildProxy();
    }
View Full Code Here

Examples of org.apache.camel.builder.ProxyBuilder

    }

    // START SNIPPET: e4
    public void testProxyBuilderProxyCallAnotherBean() throws Exception {
        // use ProxyBuilder to easily create the proxy
        OrderService service = new ProxyBuilder(context).endpoint("direct:bean").build(OrderService.class);

        String reply = service.submitOrderStringReturnString("World");
        assertEquals("Hello World", reply);
    }
View Full Code Here

Examples of org.apache.camel.builder.ProxyBuilder

        assertEquals("Hi nobody", reply);
    }

    public void testProxyBuilderProxyCallAnotherBeanWithNoArgs() throws Exception {
        Endpoint endpoint = context.getEndpoint("direct:bean");
        OrderService service = new ProxyBuilder(context).endpoint(endpoint).build(OrderService.class);

        String reply = service.doAbsolutelyNothing();
        assertEquals("Hi nobody", reply);
    }
View Full Code Here

Examples of org.apache.camel.builder.ProxyBuilder

        assertMockEndpointsSatisfied();
    }

    public void testProxyBuilderVoidAsInOut() throws Exception {
        // will by default let all exchanges be InOut
        OrderService service = new ProxyBuilder(context).endpoint("seda:delay").build(OrderService.class);

        getMockEndpoint("mock:delay").expectedBodiesReceived("Hello World", "Bye World");
        service.doNothing("Hello World");
        template.sendBody("mock:delay", "Bye World");
View Full Code Here

Examples of org.apache.camel.builder.ProxyBuilder

    }

    // START SNIPPET: e4
    public void testProxyBuilderProxyCallAnotherBean() throws Exception {
        // use ProxyBuilder to easily create the proxy
        OrderService service = new ProxyBuilder(context).endpoint("direct:bean").build(OrderService.class);

        String reply = service.submitOrderStringReturnString("World");
        assertEquals("Hello World", reply);
    }
View Full Code Here

Examples of org.apache.camel.builder.ProxyBuilder

        assertEquals("Hi nobody", reply);
    }

    public void testProxyBuilderProxyCallAnotherBeanWithNoArgs() throws Exception {
        Endpoint endpoint = context.getEndpoint("direct:bean");
        OrderService service = new ProxyBuilder(context).endpoint(endpoint).build(OrderService.class);

        String reply = service.doAbsolutelyNothing();
        assertEquals("Hi nobody", reply);
    }
View Full Code Here

Examples of org.apache.camel.builder.ProxyBuilder

        assertMockEndpointsSatisfied();
    }

    public void testProxyBuilderVoidAsInOut() throws Exception {
        // will by default let all exchanges be InOut
        OrderService service = new ProxyBuilder(context).endpoint("seda:delay").build(OrderService.class);

        getMockEndpoint("mock:delay").expectedBodiesReceived("Hello World", "Bye World");
        service.doNothing("Hello World");
        template.sendBody("mock:delay", "Bye World");
View Full Code Here

Examples of org.apache.camel.builder.ProxyBuilder

        return new RouteBuilder() {
            @Override
            public void configure() throws Exception {
                // we gotta cheat and use proxy builder as ContextTestSupport doesnt do
                // all the IoC wiring we need when using @Produce on an interface
                echo = new ProxyBuilder(context).endpoint("direct:hello").build(Echo.class);

                from("direct:hello").transform(body().prepend("Hello "));
            }
        };
    }
View Full Code Here

Examples of org.apache.camel.builder.ProxyBuilder

    }

    // START SNIPPET: e4
    public void testProxyBuilderProxyCallAnotherBean() throws Exception {
        // use ProxyBuilder to easily create the proxy
        OrderService service = new ProxyBuilder(context).endpoint("direct:bean").build(OrderService.class);

        String reply = service.submitOrderStringReturnString("World");
        assertEquals("Hello World", reply);
    }
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.