View Javadoc

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