ch.elca.el4j.tests.services.exceptionhandler
Interface A

All Superinterfaces:
Adder
All Known Implementing Classes:
AImpl, B

public interface A
extends Adder

Interface for testing purposes.

Author:
Andreas Bur (ABU)
File-location:
A
Last check-in date:
2009-08-04 13:59:45 +0200 (Di, 04. Aug 2009) by swismer for revision 3873

Method Summary
 int add(int a, int b)
          Adds the two numbers.
 String concat(String a, String b)
          Concatenates the two Strings.
 int div(int a, int b)
          Divides the two integers.
 void setAdder(Adder adder)
          Sets the adder to delegate calls to.
 void setRetries(int retries)
          Sets the number of retries.
 int sub(int a, int b)
          Subtracts the given two numbers.
 void throwException()
          Throws an application level exception.
 void throwRTException()
          Throws a runtime exception.
 

Method Detail

setRetries

void setRetries(int retries)
Sets the number of retries.

Parameters:
retries - Number of retries.

setAdder

void setAdder(Adder adder)
Sets the adder to delegate calls to.

Parameters:
adder - The adder to set.

div

int div(int a,
        int b)
Divides the two integers.

Parameters:
a - Dividend.
b - Divisor.
Returns:
Returns a / b.

throwException

void throwException()
                    throws ApplicationException
Throws an application level exception.

Throws:
ApplicationException - The sample exception.

throwRTException

void throwRTException()
Throws a runtime exception.


concat

String concat(String a,
              String b)
Concatenates the two Strings.

Parameters:
a - the first string.
b - the second string.
Returns:
Returns the concatenation of the two strings.

add

int add(int a,
        int b)
Adds the two numbers.

Specified by:
add in interface Adder
Parameters:
a - The first number.
b - The second number.
Returns:
Returns the sum of a and b.

sub

int sub(int a,
        int b)
Subtracts the given two numbers.

Parameters:
a - The first number.
b - The second number.
Returns:
Returns a - b.


Copyright © 2005-2011 ELCA. All Rights Reserved.