Package org.mule.routing.outbound

Examples of org.mule.routing.outbound.MulticastingRouter


                // Create an ExceptionMessage which contains the original payload, the exception, and some additional context info.
                ExceptionMessage msg = new ExceptionMessage(event, t, component, endpointUri);
                MuleMessage exceptionMessage = new DefaultMuleMessage(msg, event.getMessage(), muleContext);

                // Create an outbound router with all endpoints configured on the exception strategy
                MulticastingRouter router = new MulticastingRouter()
                {
                    @Override
                    protected void setMessageProperties(FlowConstruct session, MuleMessage message, MessageProcessor target)
                    {
                        // No reply-to or correlation for exception targets, at least for now anyway.
                    }
                };
                router.setRoutes(getMessageProcessors());
                router.setMuleContext(muleContext);
               
                // Route the ExceptionMessage to the new router
                router.process(new DefaultMuleEvent(exceptionMessage, event));
            }
            catch (Exception e)
            {
                logFatal(event, e);
            }
View Full Code Here


        this.router = router;
    }

    public OutRouteBuilder to(String uri)
    {
        MulticastingRouter mcr = new MulticastingRouter();
        mcr.setMuleContext(muleContext);
        router.addRoute(mcr);
        return this;
    }
View Full Code Here

                // Create an ExceptionMessage which contains the original payload, the exception, and some additional context info.
                ExceptionMessage msg = new ExceptionMessage(event, t, component, endpointUri);
                MuleMessage exceptionMessage = new DefaultMuleMessage(msg, event.getMessage(), muleContext);

                // Create an outbound router with all endpoints configured on the exception strategy
                MulticastingRouter router = new MulticastingRouter()
                {
                    @Override
                    protected void setMessageProperties(FlowConstruct session, MuleMessage message, MessageProcessor target)
                    {
                        // No reply-to or correlation for exception targets, at least for now anyway.
                    }
                };
                router.setRoutes(getMessageProcessors());
                router.setMuleContext(muleContext);

                // Route the ExceptionMessage to the new router
                router.route(new DefaultMuleEvent(exceptionMessage, event));
            }
            catch (Exception e)
            {
                logFatal(event, e);
            }
View Full Code Here

        this.router = router;
    }

    public OutRouteBuilder to(String uri)
    {
        MulticastingRouter mcr = new MulticastingRouter();
        mcr.setMuleContext(muleContext);
        router.addRoute(mcr);
        return this;
    }
View Full Code Here

TOP

Related Classes of org.mule.routing.outbound.MulticastingRouter

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.