1 | public class CountImpl extends Counter._CountImplBase { |
2 | private int sum; |
3 | public CountImpl(java.lang.String name) { // Construct a persistent object. |
4 | super(name); sum=0; |
5 | System.out.println("Count Object Created"); } |
6 | public CountImpl() { // Construct a transient object |
7 | super(); } |
8 | public int increment() { // Implementation of remote operation |
9 | sum++; |
10 | return sum; } |
11 | public void sum(int val) { // implement attribute writer... |
12 | sum = val; } |
13 | public int sum() { // implement attribute reader... |
14 | return sum; } |
15 | } |