Package org.mule.api.source

Examples of org.mule.api.source.MessageSource


    {
        if (flowConstruct != null)
        {
            if (flowConstruct instanceof Service)
            {
                MessageSource source = ((Service) flowConstruct).getMessageSource();

                if (source instanceof InboundEndpoint)
                {
                    return ((InboundEndpoint) source).getEndpointURI().toString();
                }
                else if (source instanceof ServiceCompositeMessageSource)
                {
                    List<InboundEndpoint> endpoints = ((ServiceCompositeMessageSource) muleService.getMessageSource()).getEndpoints();

                    if (endpoints.size() > 0)
                    {
                        return endpoints.get(0).getEndpointURI().toString();
                    }
                }
            }
            else if (flowConstruct instanceof Pipeline)
            {
                MessageSource source = ((Pipeline) flowConstruct).getMessageSource();

                if (source instanceof InboundEndpoint)
                {
                    return ((InboundEndpoint) source).getEndpointURI().toString();
                }
View Full Code Here


    {
        if (flowConstruct != null)
        {
            if (flowConstruct instanceof Service)
            {
                MessageSource source = ((Service) flowConstruct).getMessageSource();

                if (source instanceof InboundEndpoint)
                {
                    return ((InboundEndpoint) source).getEndpointURI().toString();
                }
                else if (source instanceof ServiceCompositeMessageSource)
                {
                    List<InboundEndpoint> endpoints = ((ServiceCompositeMessageSource) muleService.getMessageSource()).getEndpoints();

                    if (endpoints.size() > 0)
                    {
                        return endpoints.get(0).getEndpointURI().toString();
                    }
                }
            }
            else if (flowConstruct instanceof Pipeline)
            {
                MessageSource source = ((Pipeline) flowConstruct).getMessageSource();

                if (source instanceof InboundEndpoint)
                {
                    return ((InboundEndpoint) source).getEndpointURI().toString();
                }
View Full Code Here

    private final MessageProcessor internalListener = new InternalMessageProcessor();
    protected MuleContext muleContext;

    public void addSource(MessageSource source) throws MuleException
    {
        MessageSource messageSource = source;

        if (messageSource instanceof ClusterizableMessageSource)
        {
            messageSource = new ClusterizableMessageSourceWrapper((ClusterizableMessageSource) messageSource);
        }
View Full Code Here

        final CountDownLatch processingLatch = new CountDownLatch(1);

        MessageProcessor target = mock(MessageProcessor.class);
        asyncReplyMP.setListener(target);

        MessageSource messageSource = mock(MessageSource.class);
        asyncReplyMP.setReplySource(messageSource);

        final boolean[] exceptionThrown = new boolean[1];
        final Object[] responseEvent = new Object[1];
View Full Code Here

    private IdempotentRedeliveryPolicy redeliveryPolicyFromFlow(String flowName) throws Exception
    {
        FlowConstruct flow = getFlowConstruct(flowName);
        assertTrue(flow instanceof Flow);

        MessageSource source = ((Flow) flow).getMessageSource();
        assertTrue(source instanceof InboundEndpoint);
        AbstractRedeliveryPolicy redeliveryPolicy = ((InboundEndpoint)source).getRedeliveryPolicy();
        assertTrue(redeliveryPolicy instanceof IdempotentRedeliveryPolicy);
        return (IdempotentRedeliveryPolicy) redeliveryPolicy;
    }
View Full Code Here

    }

    @Test
    public void testDetectsSelector() throws Exception
    {
        MessageSource source = getSource();
        InboundEndpoint ep = null;
        ep = getEnpoint(source, ep);

        JmsConnector connector = (JmsConnector) muleContext.getRegistry().lookupConnector("jmsConnector");
        JmsSelectorFilter selector = connector.getSelector(ep);
View Full Code Here

        return ep;
    }

    private MessageSource getSource()
    {
        MessageSource source;
        Object flowOrService = muleContext.getRegistry().lookupObject("TestSelector");
        assertNotNull(flowOrService);
        if (flowOrService instanceof Service)
        {
            Service svc = (Service) flowOrService;
View Full Code Here

TOP

Related Classes of org.mule.api.source.MessageSource

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.