0
|
1 package rep;
|
|
2
|
|
3 public class REPCommand {
|
8
|
4 public static REPCommand SMCMD_SESSION_JOIN = new REPCommand(REP.SMCMD_SM_JOIN, 0, 0, 0, 0, 0, "");
|
0
|
5 public int cmd;
|
|
6 public int sid;
|
|
7 public int eid;
|
|
8 public int seq;
|
|
9 public int len;
|
|
10 public int lineno;
|
|
11 public boolean stat;
|
|
12
|
|
13 public String string;
|
|
14 private int textsiz;
|
17
|
15 String host;
|
19
|
16 String port;
|
0
|
17
|
|
18 public REPCommand(int cmd,int sid,int eid, int seq, int lineno, int textsiz, String string) {
|
|
19 this.cmd = cmd;
|
|
20 this.sid = sid;
|
|
21 this.eid = eid;
|
|
22 this.seq = seq;
|
|
23 this.textsiz = textsiz;
|
|
24 this.lineno = lineno;
|
|
25 this.string = string;
|
|
26 }
|
|
27
|
25
|
28 public REPCommand() {
|
|
29 // TODO Auto-generated constructor stub
|
|
30 }
|
|
31
|
0
|
32 public String toString(){
|
|
33 String repCmdString = new String(cmd + "," + sid + "," + eid + "," + seq + "," + lineno + "," + textsiz + "," + string);
|
|
34 return repCmdString;
|
|
35 }
|
|
36
|
|
37 public void setEID(int eid2) {
|
|
38 // TODO Auto-generated method stub
|
|
39 this.eid = eid2;
|
|
40 }
|
|
41
|
|
42 public void setCMD(int cmd2) {
|
|
43 // TODO Auto-generated method stub
|
|
44 this.cmd = cmd2;
|
|
45 }
|
|
46
|
|
47 public void setSID(int sessionID) {
|
|
48 // TODO Auto-generated method stub
|
|
49 this.sid = sessionID;
|
|
50 }
|
1
|
51
|
12
|
52 public void setString(String string2) {
|
|
53 // TODO Auto-generated method stub
|
|
54 string = string2;
|
|
55 }
|
|
56
|
17
|
57 public void setHost(String host) {
|
|
58 // TODO Auto-generated method stub
|
|
59 this.host = host;
|
|
60 }
|
|
61
|
19
|
62 public void setPort(String port) {
|
17
|
63 // TODO Auto-generated method stub
|
|
64 this.port = port;
|
|
65 }
|
75
|
66
|
|
67 public REPCommand clone(){
|
|
68 REPCommand command = new REPCommand(cmd, sid, eid, seq, lineno, textsiz, string);
|
|
69 return command;
|
|
70 }
|
17
|
71
|
0
|
72 }
|