View Javadoc

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