Mercurial > hg > RemoteEditor > REPSessionManager
comparison rep/REPCommand.java @ 284:90965a3bd4f3
editor simulator
author | kono |
---|---|
date | Sun, 28 Sep 2008 14:16:13 +0900 |
parents | 6d172579a78d |
children | bb9e202af4d8 |
comparison
equal
deleted
inserted
replaced
283:b864d2f60102 | 284:90965a3bd4f3 |
---|---|
1 package rep; | 1 package rep; |
2 | 2 |
3 import rep.REP; | 3 import rep.REP; |
4 | 4 |
5 public class REPCommand { | 5 public class REPCommand { |
6 public static REPCommand SMCMD_SESSION_JOIN = new REPCommand(REP.SMCMD_SM_JOIN, 0, 0, 0, 0, 0, ""); | 6 public static REPCommand SMCMD_SESSION_JOIN = new REPCommand(REP.SMCMD_SM_JOIN, 0, 0, 0, 0, ""); |
7 public REP cmd; | 7 public REP cmd; |
8 public int sid; | 8 public int sid; |
9 public int eid; | 9 public int eid; |
10 public int seq; | 10 public int seq; |
11 public int len; | 11 public int len; |
12 public int lineno; | 12 public int lineno; |
13 public boolean stat; | 13 public boolean stat; |
14 public boolean throughMaster; | 14 public boolean throughMaster; |
15 | 15 |
16 public String string; | 16 public String string; |
17 private int textsiz; | |
18 String host; | 17 String host; |
19 String port; | 18 String port; |
20 | 19 |
21 public REPCommand(REP cmd,int sid,int eid, int seq, int lineno, int textsiz, String string) { | 20 public REPCommand(REP cmd,int sid,int eid, int seq, int lineno, String string) { |
22 this.cmd = cmd; | 21 this.cmd = cmd; |
23 this.sid = sid; | 22 this.sid = sid; |
24 this.eid = eid; | 23 this.eid = eid; |
25 this.seq = seq; | 24 this.seq = seq; |
26 this.textsiz = textsiz; | |
27 this.lineno = lineno; | 25 this.lineno = lineno; |
28 this.string = string; | 26 this.string = string; |
29 this.throughMaster = false; | 27 this.throughMaster = false; |
30 } | 28 } |
31 public REPCommand(REPCommand cmd){ | 29 public REPCommand(REPCommand cmd){ |
32 this(cmd.cmd, cmd.sid, cmd.eid, cmd.seq, cmd.lineno, cmd.string.length(), new String(cmd.string)); | 30 this(cmd.cmd, cmd.sid, cmd.eid, cmd.seq, cmd.lineno, new String(cmd.string)); |
33 } | 31 } |
34 | 32 |
35 public REPCommand() { | 33 public REPCommand() { |
36 // TODO Auto-generated constructor stub | 34 // TODO Auto-generated constructor stub |
37 } | 35 } |
39 int textsiz, String string) { | 37 int textsiz, String string) { |
40 this.cmd = REP.newREP(cmd); | 38 this.cmd = REP.newREP(cmd); |
41 this.sid = sid; | 39 this.sid = sid; |
42 this.eid = eid; | 40 this.eid = eid; |
43 this.seq = seq; | 41 this.seq = seq; |
44 this.textsiz = textsiz; | |
45 this.lineno = lineno; | 42 this.lineno = lineno; |
46 this.string = string; | 43 this.string = string; |
47 this.throughMaster = false; | 44 this.throughMaster = false; |
48 } | 45 } |
49 | 46 |
50 public String toString(){ | 47 public String toString(){ |
51 String repCmdString = new String(cmd + ",sid=" + sid + ",eid=" + eid + ",seq=" + seq + ",lineno=" + lineno + ",sz=" + textsiz + "," + string); | 48 String repCmdString = new String(cmd + ",sid=" + sid + ",eid=" + eid + ",seq=" + seq + |
49 ",lineno=" + lineno + ",sz=" + string.length() + "," + string); | |
52 return repCmdString; | 50 return repCmdString; |
53 } | 51 } |
54 | 52 |
55 public void setEID(int eid2) { | 53 public void setEID(int eid2) { |
56 // TODO Auto-generated method stub | |
57 this.eid = eid2; | 54 this.eid = eid2; |
58 } | 55 } |
59 | 56 |
60 public void setCMD(REP cmd2) { | 57 public void setCMD(REP cmd2) { |
61 // TODO Auto-generated method stub | |
62 this.cmd = cmd2; | 58 this.cmd = cmd2; |
63 } | 59 } |
64 | 60 |
65 public void setSID(int sessionID) { | 61 public void setSID(int sessionID) { |
66 // TODO Auto-generated method stub | |
67 this.sid = sessionID; | 62 this.sid = sessionID; |
68 } | 63 } |
69 | 64 |
70 public void setString(String string2) { | 65 public void setString(String string2) { |
71 // TODO Auto-generated method stub | |
72 string = string2; | 66 string = string2; |
73 } | 67 } |
74 | 68 |
75 public void setHost(String host) { | 69 public void setHost(String host) { |
76 // TODO Auto-generated method stub | |
77 this.host = host; | 70 this.host = host; |
78 } | 71 } |
79 | 72 |
80 public void setPort(String port) { | 73 public void setPort(String port) { |
81 // TODO Auto-generated method stub | |
82 this.port = port; | 74 this.port = port; |
83 } | 75 } |
84 | 76 |
85 public void setThroughMaster(boolean f){ | 77 public void setThroughMaster(boolean f){ |
86 this.throughMaster=f; | 78 this.throughMaster=f; |
87 } | 79 } |
88 public void setSEQID(int i) { | 80 public void setSEQID(int i) { |
89 // TODO Auto-generated method stub | |
90 seq = i; | 81 seq = i; |
91 } | 82 } |
92 | 83 |
93 } | 84 } |