8
|
1 package rep;
|
|
2
|
126
|
3 import rep.channel.REPSocketChannel;
|
8
|
4
|
319
|
5 public class EditorPlus {
|
8
|
6
|
319
|
7 public int eid; // unique in a session, eid==0 master
|
|
8 public int sid=-1; // globally unique
|
|
9 public String host;
|
|
10 public String file;
|
|
11 public REPSocketChannel<REPCommand> channel;
|
|
12
|
|
13 public EditorPlus() {
|
|
14
|
|
15 }
|
|
16
|
|
17 public EditorPlus(int eid, REPSocketChannel<REPCommand> channel) {
|
8
|
18 this.eid = eid;
|
|
19 this.channel = channel;
|
|
20 }
|
319
|
21
|
|
22 public String getName() {
|
|
23 return file;
|
|
24 }
|
|
25
|
|
26 public void setName(String string) {
|
|
27 file = string;
|
|
28 }
|
|
29
|
|
30
|
|
31 public void setSID(int sid) {
|
|
32 this.sid = sid;
|
|
33 }
|
|
34
|
|
35 public int getSID() {
|
|
36 return sid;
|
|
37 }
|
|
38
|
8
|
39 public String toString(){
|
|
40 return ("Editor:" + eid);
|
|
41 }
|
319
|
42
|
|
43 public void setEID(int eid) {
|
|
44 this.eid = eid;
|
|
45 }
|
|
46
|
8
|
47 public int getEID(){
|
|
48 return eid;
|
|
49 }
|
319
|
50
|
|
51 public void setHost(String host){
|
|
52 this.host = host;
|
|
53 }
|
|
54
|
|
55
|
|
56 public String getHost(){
|
|
57 return host;
|
|
58 }
|
|
59 public REPSocketChannel<REPCommand> getChannel(){
|
8
|
60 return channel;
|
|
61
|
|
62 }
|
319
|
63 public void setChannel(REPSocketChannel<REPCommand> channel) {
|
|
64 this.channel = channel;
|
|
65 }
|
8
|
66 }
|