Package org.mule.endpoint

Examples of org.mule.endpoint.EndpointURIEndpointBuilder


            {
                transformer = new FileMessageFactoryAssertingTransformer(byte[].class);
            }
        }
       
        EndpointBuilder endpointBuilder = new EndpointURIEndpointBuilder(url, muleContext);
        endpointBuilder.addMessageProcessor(transformer);
        if (filePayload)
        {
            endpointBuilder.addMessageProcessor(new NoActionTransformer());
        }
        InboundEndpoint endpoint =
            muleContext.getEndpointFactory().getInboundEndpoint(endpointBuilder);
        ((CompositeMessageSource) service.getMessageSource()).addSource(endpoint);
       
View Full Code Here


        // do nothing
    }
   
    public void testSmtpDoesNotSupportOutboundEndpoints() throws MuleException
    {
        EndpointBuilder builder = new EndpointURIEndpointBuilder(getTestEndpointURI(), muleContext);
        builder.setName("test");

        try
        {
            muleContext.getEndpointFactory().getInboundEndpoint(builder);
            fail("Inbound SMTP endpoints are not supported");
View Full Code Here

        FileConnector c = (FileConnector) muleContext.getRegistry().lookupConnector("fileConnector2");
        assertNotNull(c);
        assertNotNull(c.getServiceOverrides());

        EndpointBuilder builder = new EndpointURIEndpointBuilder("file:///temp?connector=fileConnector1",
            muleContext);
        builder.setConnector(c);
        endpoint = muleContext.getEndpointFactory().getInboundEndpoint(builder);
        assertNotNull(((AbstractConnector) endpoint.getConnector()).getServiceOverrides());

        EndpointBuilder builder2 = new EndpointURIEndpointBuilder("file:///temp?connector=fileConnector3",
            muleContext);
        builder.setConnector(c);
        endpoint = muleContext.getEndpointFactory().getInboundEndpoint(builder2);
        assertNull(((AbstractConnector) endpoint.getConnector()).getServiceOverrides());

        EndpointBuilder builder3 = new EndpointURIEndpointBuilder("file:///temp?connector=fileConnector2",
            muleContext);
        builder.setConnector(c);
        endpoint = muleContext.getEndpointFactory().getInboundEndpoint(builder3);
        assertNotNull(((AbstractConnector) endpoint.getConnector()).getServiceOverrides());
View Full Code Here

    public InboundEndpoint getEndpoint() throws Exception
    {
        UdpConnector connector = new UdpConnector(muleContext);
        connector.initialise();
       
        EndpointBuilder builder = new EndpointURIEndpointBuilder("udp://localhost:10100", muleContext);
        builder.setConnector(connector);
        return muleContext.getEndpointFactory().getInboundEndpoint(builder);
    }
View Full Code Here

        return new HttpMessageReceiver(endpoint.getConnector(), (Service) mockComponent.proxy(), endpoint);
    }

    public InboundEndpoint getEndpoint() throws Exception
    {
        EndpointBuilder endpointBuilder = new EndpointURIEndpointBuilder("http://localhost:6789", muleContext);
        endpointBuilder.setResponseTransformers(CollectionUtils.singletonList(new MuleMessageToHttpResponse()));
        endpoint = muleContext.getEndpointFactory().getInboundEndpoint(endpointBuilder);
        return endpoint;
    }
View Full Code Here

        Header locationHeader = method.getResponseHeader(HttpConstants.HEADER_LOCATION);
        if (locationHeader == null)
        {
            throw new HttpResponseException(method.getStatusText(), method.getStatusCode());
        }
        OutboundEndpoint out = new EndpointURIEndpointBuilder(locationHeader.getValue(),
            connector.getMuleContext()).buildOutboundEndpoint();
        MuleEvent result = out.process(event);
        if (result != null)
        {
            return result.getMessage();
View Full Code Here

            final String uriTemplate = outboundEndpoint.getEndpointURI().getUri().toString()
                                       + "#[variable:http.path.extension]";

            final DynamicOutboundEndpoint dynamicOutboundEndpoint = new DynamicOutboundEndpoint(muleContext,
                new EndpointURIEndpointBuilder(outboundEndpoint), uriTemplate);

            builder.chain(dynamicOutboundEndpoint);
        }
    }
View Full Code Here

    @Override
    public InboundEndpoint getEndpoint() throws Exception
    {
        if (this.endpoint == null)
        {
            EndpointBuilder builder = new EndpointURIEndpointBuilder(
                "rmi://localhost:11099/TestMatchingMethodsComponent?method=reverseString", muleContext);

            if (connector == null)
            {
                throw new InitialisationException(
                    MessageFactory.createStaticMessage("Connector has not been initialized."), null);
            }
            builder.setConnector(connector);

            Map properties = new HashMap();
            properties.put("methodArgumentTypes", "java.lang.String");
            properties.put("methodArgumentsList", Arrays.asList(new String[]{"test"}));

            builder.setProperties(properties);
            endpoint = muleContext.getEndpointFactory().getInboundEndpoint(builder);

            return endpoint;
        }
        return this.endpoint;
View Full Code Here

     * This tests the endpoint propery of wsdlUrl which specifies an alternative WSDL
     * location (see MULE-1368)
     */
    public void testCxfWsdlServiceWithEndpointParam() throws Exception
    {
        EndpointBuilder endpointBuilder = new EndpointURIEndpointBuilder(TEST_URL_NOWSDL, muleContext);
        endpointBuilder.setProperty("wsdlUrl", TEST_URL_WSDL);

        OutboundEndpoint endpoint =
            muleContext.getEndpointFactory().getOutboundEndpoint(endpointBuilder);

        MuleMessage message = new DefaultMuleMessage("test1", muleContext);
View Full Code Here

    public WsdlCxfEndpointBuilder(EndpointURIEndpointBuilder global) throws EndpointException
    {
        super(global);

        this.wsdlAddress = getEndpointAddressWithoutMetaScheme(global.getEndpointBuilder().toString());
        this.uriBuilder = new EndpointURIEndpointBuilder(wsdlAddress, muleContext).getEndpointBuilder();
    }
View Full Code Here

TOP

Related Classes of org.mule.endpoint.EndpointURIEndpointBuilder

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.