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.module.ibeans.annotations;
8   
9   import java.net.UnknownHostException;
10  
11  import org.ibeans.annotation.Call;
12  import org.ibeans.annotation.Template;
13  import org.ibeans.annotation.param.Optional;
14  import org.ibeans.annotation.param.UriParam;
15  import org.ibeans.api.ExceptionListenerAware;
16  
17  /**
18   * A test bean that uses an exception listener rather than declaring exceptions on all the method calls
19   */
20  
21  public interface TestUriIBean extends ExceptionListenerAware
22  {
23      @UriParam("do_something_uri")
24      public static final String DO_SOMETHING_URI = "doesnotexist.bom?param1=";
25  
26      @Template("http://{do_something_uri}{foo}")
27      public String doSomething(@UriParam("foo") String foo);
28  
29      @Template("http://{do_something_uri}{foo}&param2={bar}")
30      public String doSomethingElse(@UriParam("foo") String foo, @UriParam("bar") String bar) throws UnknownHostException;
31  
32      @Call(uri = "http://{do_something_uri}")
33      public String doSomethingNoParams() throws Exception;
34  
35      @Template("http://{do_something_uri}{foo}&param2={bar}")
36      public String doSomethingOptional(@Optional @UriParam("foo") String foo, @Optional @UriParam("bar") String bar) throws UnknownHostException;
37  }