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