Line | |
---|
1 | package test2; |
---|
2 | |
---|
3 | import java.util.List; |
---|
4 | |
---|
5 | import omq.common.broker.Broker; |
---|
6 | import omq.exception.RemoteException; |
---|
7 | import omq.server.remote.request.RemoteObject; |
---|
8 | |
---|
9 | public class CarImpl extends RemoteObject implements Car { |
---|
10 | |
---|
11 | /** |
---|
12 | * |
---|
13 | */ |
---|
14 | private static final long serialVersionUID = 1L; |
---|
15 | private String plate; |
---|
16 | private int hp; |
---|
17 | private List<Rim> rims; |
---|
18 | private Mobile mobile; |
---|
19 | |
---|
20 | @Override |
---|
21 | public void setPlate(String plate) { |
---|
22 | this.plate = plate; |
---|
23 | } |
---|
24 | |
---|
25 | @Override |
---|
26 | public String getPlate() { |
---|
27 | return plate; |
---|
28 | } |
---|
29 | |
---|
30 | @Override |
---|
31 | public void setHP(int hp) { |
---|
32 | this.hp = hp; |
---|
33 | } |
---|
34 | |
---|
35 | @Override |
---|
36 | public int getHP() { |
---|
37 | return hp; |
---|
38 | } |
---|
39 | |
---|
40 | @Override |
---|
41 | public void setRims(List<Rim> rims) { |
---|
42 | this.rims = rims; |
---|
43 | } |
---|
44 | |
---|
45 | @Override |
---|
46 | public List<Rim> getRims() { |
---|
47 | return rims; |
---|
48 | } |
---|
49 | |
---|
50 | @Override |
---|
51 | public void setMobile(String mobile) throws RemoteException { |
---|
52 | this.mobile = (Mobile) Broker.lookup(mobile, Mobile.class); |
---|
53 | } |
---|
54 | |
---|
55 | @Override |
---|
56 | public String getMobile() { |
---|
57 | return mobile.getRef(); |
---|
58 | } |
---|
59 | |
---|
60 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.