Package org.mule.endpoint

Examples of org.mule.endpoint.URIBuilder


    }

    @Test
    public void testQueriesWithAddress()
    {
        URIBuilder uri = new URIBuilder(unusedMuleContext);
        uri.setAddress("foo://bar");
        uri.setQueryMap(queries);
        assertEquals("foo://bar?aname=avalue&bname=bvalue", uri.toString());
    }
View Full Code Here


    }

    @Test
    public void testLiteralQueries()
    {
        URIBuilder uri = new URIBuilder(unusedMuleContext);
        uri.setAddress("foo://bar?cname=cvalue");
        uri.setQueryMap(queries);
        assertEquals("foo://bar?cname=cvalue&aname=avalue&bname=bvalue", uri.toString());
    }
View Full Code Here

    }

    @Test
    public void testFromString()
    {
        URIBuilder uri = new URIBuilder("test://bar", unusedMuleContext);
        EndpointURI endpointURI = uri.getEndpoint();
        assertEquals("test://bar", endpointURI.getUri().toString());
        assertEquals("test", endpointURI.getSchemeMetaInfo());
        uri = new URIBuilder("meta:test://bar", unusedMuleContext);
        endpointURI = uri.getEndpoint();
        assertEquals("test://bar", endpointURI.getUri().toString());
        assertEquals("meta", endpointURI.getSchemeMetaInfo());
    }
View Full Code Here

        this.muleContext = muleContext;
    }

    public void setAsText(String text)
    {
        setValue(new URIBuilder(text, muleContext));
    }
View Full Code Here

        {
            builder = muleContext.getRegistry().lookupEndpointBuilder(endpointUri.getEndpointName());
        }
        if (builder == null)
        {
            builder = new EndpointURIEndpointBuilder(new URIBuilder(endpointUri));
        }

        builder.setExchangePattern(MessageExchangePattern.REQUEST_RESPONSE);

        OutboundEndpoint endpoint = getMuleContext().getEndpointFactory().getOutboundEndpoint(builder);
View Full Code Here

        {
            builder = muleContext.getRegistry().lookupEndpointBuilder(endpointUri.getEndpointName());
        }
        if (builder == null)
        {
            builder = new EndpointURIEndpointBuilder(new URIBuilder(endpointUri));
        }

        builder.setExchangePattern(MessageExchangePattern.ONE_WAY);

        OutboundEndpoint endpoint = getMuleContext().getEndpointFactory().getOutboundEndpoint(builder);
View Full Code Here

    {
        EndpointBuilder builder = muleContext.getRegistry().lookupEndpointBuilder(endpointName);

        if (builder == null)
        {
            builder = new EndpointURIEndpointBuilder(new URIBuilder(endpointName, muleContext));
        }

        builder.setExchangePattern(MessageExchangePattern.ONE_WAY);

        OutboundEndpoint endpoint = getMuleContext().getEndpointFactory().getOutboundEndpoint(builder);
View Full Code Here

        EndpointBuilder endpointBuilder = mock(EndpointBuilder.class);
        when(endpointBuilder.buildOutboundEndpoint()).thenReturn(prototypeEndpoint);
        when(endpointBuilder.clone()).thenReturn(staticEndpointBuilder);

        DynamicOutboundEndpoint dynamicOutboundEndpoint = new DynamicOutboundEndpoint(endpointBuilder, new DynamicURIBuilder(new URIBuilder("test://localhost:#[header:port]", muleContext)));

        testOutboundEvent = createTestOutboundEvent();
        dynamicOutboundEndpoint.process(testOutboundEvent);
        dynamicOutboundEndpoint.process(testOutboundEvent);
View Full Code Here

        // This enpoint needs to be registered prior to use cause we need to set
        // the transaction config so that the endpoint will "know" it is transacted
        // and not close the session itself but leave it up to the transaction.
        EndpointBuilder endpointBuilder = new EndpointURIEndpointBuilder(
            new URIBuilder("jms://test.queue", muleContext));
        endpointBuilder.setTransactionConfig(tc);
        endpointBuilder.setName("TransactedTest.Queue");
        ImmutableEndpoint inboundEndpoint = muleContext.getEndpointFactory()
                .getOutboundEndpoint(endpointBuilder);
        client.getMuleContext().getRegistry().registerEndpoint(inboundEndpoint);
View Full Code Here

        // This enpoint needs to be registered prior to use cause we need to set
        // the transaction config so that the endpoint will "know" it is transacted
        // and not close the session itself but leave it up to the transaction.
        EndpointBuilder endpointBuilder = new EndpointURIEndpointBuilder(
            new URIBuilder("jms://test.queue", muleContext));
        endpointBuilder.setTransactionConfig(tc);
        endpointBuilder.setName("TransactedTest.Queue");
        ImmutableEndpoint inboundEndpoint = muleContext.getEndpointFactory()
                .getOutboundEndpoint(endpointBuilder);
        client.getMuleContext().getRegistry().registerEndpoint(inboundEndpoint);
View Full Code Here

TOP

Related Classes of org.mule.endpoint.URIBuilder

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.