1 | class CountServantImpl extends Counter._CountImplBase { |
2 | private int sum_; |
3 | public CountServantImpl() { |
4 | System.out.println("Count Object Created"); |
5 | sum_ = 0; |
6 | } |
7 | public int sum() { |
8 | return this.sum_; |
9 | } |
10 | public void initSum(int value) { |
11 | sum(value); |
12 | } |
13 | public int increment() { |
14 | this.sum_++; |
15 | return this.sum_; |
16 | } |
17 | } |