01: package example;
02:
03: import com.caucho.hessian.server.HessianServlet;
04:
05: public class HessianMathService extends HessianServlet {
06: /**
07: * Adds two integers.
08: */
09: public int add(int a, int b) {
10: return a + b;
11: }
12:
13: /**
14: * Subtracts two integers.
15: */
16: public int sub(int a, int b) {
17: return a - b;
18: }
19:
20: /**
21: * Multiplies two integers.
22: */
23: public int mul(int a, int b) {
24: return a * b;
25: }
26:
27: /**
28: * Divides two integers.
29: */
30: public int div(int a, int b) {
31: return a / b;
32: }
33: }
|