Rev | Line | |
---|
[46] | 1 | package omq.test.multiProcess; |
---|
[44] | 2 | |
---|
[54] | 3 | import omq.client.annotation.AsyncMethod; |
---|
| 4 | import omq.client.annotation.MultiMethod; |
---|
[44] | 5 | import omq.client.annotation.SyncMethod; |
---|
| 6 | import omq.server.RemoteObject; |
---|
| 7 | |
---|
| 8 | public class NumberImpl extends RemoteObject implements Number { |
---|
| 9 | /** |
---|
| 10 | * |
---|
| 11 | */ |
---|
| 12 | private static final long serialVersionUID = 1L; |
---|
| 13 | private int x = 0; |
---|
| 14 | |
---|
| 15 | public NumberImpl() { |
---|
| 16 | } |
---|
| 17 | |
---|
| 18 | public NumberImpl(int x) { |
---|
| 19 | this.x = x; |
---|
| 20 | } |
---|
| 21 | |
---|
| 22 | @Override |
---|
| 23 | @SyncMethod |
---|
| 24 | public void setNumber(int x) { |
---|
| 25 | this.x = x; |
---|
| 26 | } |
---|
| 27 | |
---|
| 28 | @Override |
---|
| 29 | @SyncMethod(timeout = 1000) |
---|
| 30 | public int getNumer() { |
---|
| 31 | return x; |
---|
| 32 | } |
---|
| 33 | |
---|
[54] | 34 | @Override |
---|
| 35 | @MultiMethod |
---|
| 36 | @AsyncMethod |
---|
| 37 | public void setMultiNumber(int x) { |
---|
| 38 | this.x = x; |
---|
| 39 | } |
---|
| 40 | |
---|
[44] | 41 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.