View Javadoc
1   /*
2    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
3    * The software in this package is published under the terms of the CPAL v1.0
4    * license, a copy of which has been included with this distribution in the
5    * LICENSE.txt file.
6    */
7   package org.mule.config.dsl;
8   
9   import org.mule.api.MuleContext;
10  import org.mule.api.routing.OutboundRouterCollection;
11  import org.mule.routing.outbound.MulticastingRouter;
12  
13  /**
14   * TODO
15   */
16  public class OutRouteBuilder
17  {
18      private MuleContext muleContext;
19      private OutboundRouterCollection router;
20  
21      public OutRouteBuilder(OutboundRouterCollection router, MuleContext muleContext)
22      {
23          this.muleContext = muleContext;
24          this.router = router;
25      }
26  
27      public OutRouteBuilder to(String uri)
28      {
29          MulticastingRouter mcr = new MulticastingRouter();
30          mcr.setMuleContext(muleContext);
31          router.addRoute(mcr);
32          return this;
33      }
34  
35      public OutRouteBuilder thenTo(String uri)
36      {
37          return null;
38      }
39  }