Package org.mule.api.endpoint

Examples of org.mule.api.endpoint.EndpointBuilder


                {
                    return endpoint;
                }
                else
                {
                    EndpointBuilder builder = new EndpointURIEndpointBuilder(endpoint);
                    builder.setTransformers(new LinkedList());
                    builder.setExchangePattern(MessageExchangePattern.REQUEST_RESPONSE);
                    return muleContext.getEndpointFactory().getInboundEndpoint(builder);
                }
            }
            else
            {
                return endpoint;
            }
        }
        else
        {
            EndpointBuilder builder = new EndpointURIEndpointBuilder("vm://mule.client", muleContext);
            builder.setName("muleClientProvider");
            endpoint = muleContext.getEndpointFactory().getInboundEndpoint(builder);
        }
        return endpoint;
    }
View Full Code Here


        }
        message.addProperties(messageProperties, PropertyScope.INBOUND);
        message.addProperties(messageProperties, PropertyScope.INVOCATION);

        //TODO should probably cache this
        EndpointBuilder endpointBuilder = muleContext.getEndpointFactory().getEndpointBuilder(endpoint);
        endpointBuilder.setExchangePattern(exchangePattern);
        OutboundEndpoint ep = endpointBuilder.buildOutboundEndpoint();
      
        DefaultMuleEvent event = new DefaultMuleEvent(message, ep.getExchangePattern(), flowConstruct);

        RequestContext.setEvent(event);
        MuleEvent resultEvent = ep.process(event);
View Full Code Here

            }

            // Need to do this otherise when the event is invoked the
            // transformer associated with the Mule Admin queue will be invoked, but
            // the message will not be of expected type
            EndpointBuilder builder = new EndpointURIEndpointBuilder(inboundEndpoint);
            // TODO - is this correct? it stops any other transformer from being set
            builder.setTransformers(new LinkedList());
            InboundEndpoint ep = muleContext.getEndpointFactory().getInboundEndpoint(builder);
            MuleEvent event = new DefaultMuleEvent(action.getMessage(), ep, context.getFlowConstruct(),
                context.getSession());
            event = RequestContext.setEvent(event);
View Full Code Here

            }
            else
            {
                EndpointFactory endpointFactory = managementContext.getEndpointFactory();

                EndpointBuilder endpointBuilder = endpointFactory.getEndpointBuilder(action.getResourceIdentifier());
                endpointBuilder.setExchangePattern(MessageExchangePattern.REQUEST_RESPONSE);

                endpoint = managementContext.getEndpointFactory().getOutboundEndpoint(endpointBuilder);
                result = context.sendEvent(action.getMessage(), endpoint);
                if (result == null || VoidMuleEvent.getInstance().equals(result))
                {
View Full Code Here

    {
        this.muleContext = muleContext;
        EndpointFactory endpointFactory = muleContext.getEndpointFactory();
        asyncServerEndpoint = endpointFactory.getOutboundEndpoint(endpoint);

        EndpointBuilder endpointBuilder = endpointFactory.getEndpointBuilder(endpoint);
        endpointBuilder.setExchangePattern(MessageExchangePattern.REQUEST_RESPONSE);
        syncServerEndpoint = muleContext.getEndpointFactory().getOutboundEndpoint(
            endpointBuilder);

        wireFormat = requestWireFormat();
    }
View Full Code Here

        assertEquals(XmppPacketToObject.class, transformer.getClass());
    }

    private OutboundEndpoint lookupOutboundEndpoint(String endpointName) throws Exception
    {
        EndpointBuilder endpointBuilder = lookupEndpointBuilder(endpointName);
        return endpointBuilder.buildOutboundEndpoint();
    }
View Full Code Here

        return endpointBuilder.buildOutboundEndpoint();
    }

    private InboundEndpoint lookupInboundEndpoint(String endpointName) throws Exception
    {
        EndpointBuilder endpointBuilder = lookupEndpointBuilder(endpointName);
        return endpointBuilder.buildInboundEndpoint();
    }
View Full Code Here

        return endpointBuilder.buildInboundEndpoint();
    }

    private EndpointBuilder lookupEndpointBuilder(String endpointName)
    {
        EndpointBuilder endpointBuilder = muleContext.getRegistry().lookupEndpointBuilder(endpointName);
        assertNotNull(endpointBuilder);
        return endpointBuilder;
    }
View Full Code Here

        Object endpoint1 = muleContext.getRegistry().lookupObject("Endpoint");
        // This returns the builder rather than the endpoint
        assertTrue(endpoint1 instanceof EndpointBuilder);
        assertFalse(endpoint1 instanceof ImmutableEndpoint);

        EndpointBuilder endpointBuiler = muleContext.getRegistry().lookupEndpointBuilder("Endpoint");
        // There should however be an endpoint builder with this id/name
        assertNotNull(endpointBuiler);

        ImmutableEndpoint endpoint2 = (ImmutableEndpoint) muleContext.getRegistry().lookupObject(
            "axis:http://localhost:" + dynamicPort.getNumber() + "/mule/Service?method=toString");
View Full Code Here

    public Object doGetObject() throws Exception
    {
        // If this is a meta endpoint, then we can wrap it using the meta endpoint builder from the TransportServiceDescriptor
        String scheme = getEndpointBuilder().getEndpoint().getFullScheme();
        TransportServiceDescriptor tsd = (TransportServiceDescriptor) muleContext.getRegistry().lookupServiceDescriptor(ServiceType.TRANSPORT, scheme, null);
        EndpointBuilder endpointBuilder = tsd.createEndpointBuilder(this);

        OutboundEndpoint outboundEndpoint = muleContext.getEndpointFactory().getOutboundEndpoint(endpointBuilder);
        if (outboundEndpoint instanceof AbstractEndpoint)
        {
            AbstractEndpoint.class.cast(outboundEndpoint).setAnnotations(getAnnotations());
View Full Code Here

TOP

Related Classes of org.mule.api.endpoint.EndpointBuilder

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.