View Javadoc

1   /*
2    * EL4J, the Extension Library for the J2EE, adds incremental enhancements to
3    * the spring framework, http://el4j.sf.net
4    * Copyright (C) 2005 by ELCA Informatique SA, Av. de la Harpe 22-24,
5    * 1000 Lausanne, Switzerland, http://www.elca.ch
6    *
7    * EL4J is published under the GNU Lesser General Public License (LGPL)
8    * Version 2.1. See http://www.gnu.org/licenses/
9    *
10   * This program is distributed in the hope that it will be useful,
11   * but WITHOUT ANY WARRANTY; without even the implied warranty of
12   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13   * GNU Lesser General Public License for more details.
14   *
15   * For alternative licensing, please contact info@elca.ch
16   */
17  
18  package ch.elca.el4j.tests.services.exceptionhandler;
19  
20  /**
21   * Interface for testing purposes.
22   *
23   * @svnLink $Revision: 3873 $;$Date: 2009-08-04 13:59:45 +0200 (Di, 04. Aug 2009) $;$Author: swismer $;$URL: https://el4j.svn.sourceforge.net/svnroot/el4j/branches/el4j_3_1/el4j/framework/modules/exception_handling/src/test/java/ch/elca/el4j/tests/services/exceptionhandler/A.java $
24   *
25   * @author Andreas Bur (ABU)
26   */
27  public interface A extends Adder {
28  
29  	/**
30  	 * Sets the number of retries.
31  	 *
32  	 * @param retries
33  	 *      Number of retries.
34  	 */
35  	public abstract void setRetries(int retries);
36  
37  	/**
38  	 * Sets the adder to delegate calls to.
39  	 *
40  	 * @param adder
41  	 *      The adder to set.
42  	 */
43  	public abstract void setAdder(Adder adder);
44  
45  	/**
46  	 * Divides the two integers.
47  	 *
48  	 * @param a
49  	 *      Dividend.
50  	 *
51  	 * @param b
52  	 *      Divisor.
53  	 *
54  	 * @return Returns a / b.
55  	 */
56  	public abstract int div(int a, int b);
57  
58  	/**
59  	 * Throws an application level exception.
60  	 *
61  	 * @throws ApplicationException
62  	 *      The sample exception.
63  	 */
64  	public abstract void throwException() throws ApplicationException;
65  
66  	/**
67  	 * Throws a runtime exception.
68  	 */
69  	public abstract void throwRTException();
70  
71  	/**
72  	 * Concatenates the two Strings.
73  	 *
74  	 * @param a the first string.
75  	 * @param b the second string.
76  	 * @return Returns the concatenation of the two strings.
77  	 */
78  	public abstract String concat(String a, String b);
79  
80  	/**
81  	 * {@inheritDoc}
82  	 */
83  	public abstract int add(int a, int b);
84  
85  	/**
86  	 * Subtracts the given two numbers.
87  	 *
88  	 * @param a
89  	 *      The first number.
90  	 *
91  	 * @param b
92  	 *      The second number.
93  	 *
94  	 * @return Returns a - b.
95  	 */
96  	public abstract int sub(int a, int b);
97  
98  }