0
|
1 package rep;
|
|
2
|
|
3 import java.io.IOException;
|
|
4 import java.net.InetSocketAddress;
|
2
|
5 import java.nio.channels.SelectableChannel;
|
0
|
6 import java.nio.channels.SelectionKey;
|
|
7 import java.nio.channels.Selector;
|
179
|
8
|
178
|
9 import java.util.Iterator;
|
83
|
10 import java.util.LinkedList;
|
144
|
11 import java.util.List;
|
178
|
12 import java.util.concurrent.BlockingQueue;
|
192
|
13 import java.util.concurrent.LinkedBlockingQueue;
|
0
|
14
|
123
|
15 import rep.channel.REPServerSocketChannel;
|
133
|
16 import rep.channel.REPSocketChannel;
|
144
|
17 import rep.handler.PacketSet;
|
146
|
18 import rep.handler.REPHandler;
|
148
|
19 import rep.handler.REPHandlerImpl;
|
164
|
20 import rep.handler.REPHandlerInMerge;
|
158
|
21 import rep.channel.REPSelector;
|
56
|
22 import rep.xml.SessionXMLDecoder;
|
45
|
23 import rep.xml.SessionXMLEncoder;
|
|
24
|
1
|
25 //+-------+--------+--------+-------+--------+---------+------+
|
|
26 //| cmd | session| editor | seqid | lineno | textsiz | text |
|
|
27 //| | id | id | | | | |
|
|
28 //+-------+--------+--------+-------+--------+---------+------+
|
|
29 //o-------header section (network order)-------------o
|
|
30 /*int cmd; // command
|
101
|
31 int sid; // session ID : uniqu to editing file
|
123
|
32 int eid; // editor ID : owner editor ID = 1。Session に対して unique
|
122
|
33 int seqno; // Sequence number : sequence number はエディタごとに管理
|
1
|
34 int lineno; // line number
|
101
|
35 int textsize; // textsize : bytesize
|
1
|
36 byte[] text;*/
|
|
37
|
8
|
38 public class SessionManager implements ConnectionListener, REPActionListener{
|
0
|
39
|
|
40
|
163
|
41 //private SessionList sessionlist;
|
164
|
42 private LinkedList<Session> sessionList;
|
83
|
43 private SessionManagerGUI gui;
|
191
|
44 private REPSelector selector;
|
7
|
45 private SessionManagerList smList;
|
17
|
46 private String myHost;
|
21
|
47 private boolean isMaster = true;
|
160
|
48 //private EditorList ownEditorList;
|
144
|
49 private List<Editor> editorList;
|
78
|
50 private String maxHost;
|
148
|
51 private boolean isSimulation;
|
155
|
52 private List<PacketSet> packetSetList;
|
178
|
53 private BlockingQueue<SessionManagerEvent> waitingQueue;
|
163
|
54 //private List<SessionManagerNode> managerList;
|
95
|
55 private static int temp_port;
|
|
56 private static int send_port;
|
101
|
57
|
|
58 static final int DEFAULT_PORT = 8766;
|
|
59
|
2
|
60 public SessionManager(int port) {
|
191
|
61
|
2
|
62 }
|
|
63
|
|
64 public void openSelector() throws IOException{
|
191
|
65 selector = REPSelector.create();
|
2
|
66 }
|
0
|
67
|
155
|
68 public void init(int port) throws InterruptedException, IOException {
|
2
|
69
|
186
|
70 REPServerSocketChannel<REPCommand> ssc = REPServerSocketChannel.<REPCommand>open(new REPCommandPacker());
|
122
|
71 ssc.configureBlocking(false); //reuse address 必須
|
101
|
72 ssc.socket().setReuseAddress(true);
|
192
|
73 ssc.socket().bind(new InetSocketAddress("localhost", port));
|
|
74 ssc.register(selector, SelectionKey.OP_ACCEPT, new REPHandlerImpl(-1, this));
|
|
75 //registerChannel(selector, ssc, SelectionKey.OP_ACCEPT);
|
6
|
76
|
|
77
|
163
|
78 //sessionlist = new SessionList();
|
144
|
79 sessionList = new LinkedList<Session>();
|
7
|
80 smList = new SessionManagerList();
|
162
|
81 //ownEditorList = new EditorList();
|
144
|
82 editorList = new LinkedList<Editor>();
|
155
|
83 packetSetList = new LinkedList<PacketSet>();
|
0
|
84
|
192
|
85 waitingQueue = new LinkedBlockingQueue<SessionManagerEvent>();
|
155
|
86 // main loop
|
191
|
87 //mainLoop();
|
155
|
88 }
|
|
89
|
|
90 private void mainLoop() throws IOException {
|
0
|
91 while(true){
|
178
|
92 if(checkSend()){
|
|
93 if(selector.selectNow() > 0){
|
|
94 select();
|
|
95 }
|
|
96 continue;
|
|
97 }
|
0
|
98 selector.select();
|
144
|
99 select();
|
|
100 }
|
|
101 }
|
|
102
|
178
|
103 private boolean checkSend() {
|
|
104 for(Iterator<PacketSet> it = packetSetList.iterator(); it.hasNext();){
|
|
105 PacketSet p = it.next();
|
|
106 if(p.getEditor().isMerging()) {
|
|
107 continue;
|
|
108 }else{
|
|
109 manage(p.channel, p.command);
|
|
110 it.remove();
|
|
111 }
|
|
112 }
|
|
113 return false;
|
|
114 }
|
|
115
|
144
|
116 private void select() throws IOException {
|
178
|
117 SessionManagerEvent e = waitingQueue.poll();
|
|
118 if(e != null) {
|
|
119 e.exec();
|
|
120 }
|
148
|
121 for(SelectionKey key : selector.selectedKeys()){
|
144
|
122 if(key.isAcceptable()){
|
|
123 /*** serverChannelはenableになったSelectionKeyのchannel ***/
|
146
|
124 REPServerSocketChannel serverChannel = (REPServerSocketChannel)key.channel();
|
173
|
125 REPSocketChannel channel = serverChannel.accept1(); //keyからchannelを取って、accept
|
144
|
126 registerChannel (selector, channel, SelectionKey.OP_READ);
|
|
127 channel = null;
|
123
|
128
|
144
|
129 }else if(key.isReadable()){
|
|
130
|
146
|
131 REPHandler handler = (REPHandler)key.attachment();
|
|
132 handler.handle(key);
|
144
|
133
|
|
134 }else if(key.isConnectable()){
|
|
135 System.out.println("Connectable");
|
0
|
136 }
|
|
137 }
|
|
138 }
|
1
|
139
|
178
|
140 private void registerChannel(Selector selector, SelectableChannel channel, int ops) throws IOException {
|
2
|
141 if(channel == null) {
|
|
142 return;
|
|
143 }
|
|
144 channel.configureBlocking(false);
|
170
|
145 REPHandler handler = new REPHandlerImpl(-1, this);
|
148
|
146 channel.register(selector, ops, handler);
|
2
|
147 }
|
|
148
|
144
|
149 public void manage(REPSocketChannel<REPCommand> channel, REPCommand receivedCommand) {
|
75
|
150 if(receivedCommand == null) return;
|
158
|
151 //Session session;
|
141
|
152 REPCommand sendCommand = new REPCommand(receivedCommand);
|
178
|
153 REPSocketChannel<REPCommand> send = channel;
|
144
|
154
|
75
|
155 switch(receivedCommand.cmd){
|
144
|
156
|
0
|
157 case REP.SMCMD_JOIN:
|
164
|
158 {
|
|
159 //どのSessionにも属さないエディタをリストに追加
|
|
160 Editor editor = new Editor(editorList.size(), channel);
|
|
161 editor.setHost(myHost);
|
|
162 editorList.add(editor);
|
144
|
163
|
164
|
164 //GUIに反映
|
182
|
165 //gui.setComboEditor(editor.getEID(), channel);
|
|
166 gui.update();
|
164
|
167 }
|
|
168
|
|
169
|
|
170 break;
|
144
|
171
|
1
|
172 case REP.SMCMD_JOIN_ACK:
|
144
|
173
|
1
|
174 break;
|
144
|
175
|
0
|
176 case REP.SMCMD_PUT:
|
164
|
177 {
|
|
178 //エディタのリストに追加
|
|
179 Editor editor = new Editor(editorList.size(), channel);
|
|
180 editorList.add(editor);
|
|
181
|
|
182 //Sessionを生成
|
|
183 int sid = sessionList.size();
|
|
184 editor = new Editor(0, channel);
|
|
185 editor.setHost(myHost);
|
|
186 Session session = new Session(sid, editor);
|
|
187 session.hasOwner(true);
|
|
188 sessionList.add(new Session(sid, editor));
|
|
189
|
|
190 //GUIに反映
|
178
|
191 //gui.update();ぐらいで
|
164
|
192 gui.setComboSession(session.getSID(), session.getName());
|
|
193 gui.setComboEditor(editor.getEID(), editor.getChannel());
|
158
|
194
|
164
|
195 //エディタにAckを送信
|
|
196 sendCommand.setCMD(REP.SMCMD_PUT_ACK);
|
|
197 sendCommand.setEID(editor.getEID());
|
|
198 sendCommand.setSID(session.getSID());
|
|
199 editor.send(sendCommand);
|
144
|
200
|
164
|
201 //他のSessionManagerへSessionの追加を報告
|
|
202 SessionXMLEncoder sessionEncoder = new SessionXMLEncoder(session);
|
|
203 REPCommand command = new REPCommand();
|
|
204 command.setSID(session.getSID());
|
|
205 command.setString(sessionEncoder.sessionListToXML());
|
|
206 command.setCMD(REP.SMCMD_UPDATE);
|
|
207 smList.sendExcept(channel, command);
|
|
208
|
|
209 }
|
|
210
|
|
211 break;
|
133
|
212
|
0
|
213 case REP.SMCMD_SELECT:
|
164
|
214 {
|
178
|
215 //他のSessionManagerをエディタとしてSessionに追加
|
164
|
216 Editor editor = new Editor(channel);
|
|
217 Session session = getSession(receivedCommand.sid);
|
|
218 session.addEditor(editor);
|
|
219
|
|
220 if(session.hasOwner()){
|
|
221 //このSessionManagerがオーナーを持っている場合、Sessionにエディタを追加し、エディタへAckを返す
|
|
222 sendCommand.setCMD(REP.SMCMD_SELECT_ACK);
|
|
223 sendCommand.setEID(editor.getEID());
|
|
224 editor.send(sendCommand);
|
|
225 }else{
|
|
226 //オーナーを持ってない場合は、オーナーを持っているSessionManagerへSELECTコマンドを中継する
|
|
227 Editor owner = session.getOwner();
|
|
228 owner.send(receivedCommand);
|
148
|
229 }
|
164
|
230 }
|
144
|
231
|
164
|
232 break;
|
144
|
233
|
8
|
234 case REP.SMCMD_SELECT_ACK:
|
160
|
235 {
|
85
|
236 String hostport = receivedCommand.string;
|
160
|
237 Editor editor = getEditor(hostport);
|
164
|
238
|
160
|
239 if(editor != null) {
|
|
240 //host, port を見て、このコマンドが自分が送信したSelectコマンドのAckかどうかを判断する
|
|
241 REPCommand command = new REPCommand();
|
|
242 command.setCMD(REP.SMCMD_JOIN_ACK);
|
|
243 command.setSID(receivedCommand.sid);
|
|
244 command.setEID(receivedCommand.eid);
|
|
245 editor.send(command);
|
164
|
246
|
85
|
247 }else{
|
160
|
248 //自分が送信したコマンドでなければ、次のSessionManagerへ中継する
|
85
|
249 smList.sendExcept(channel, receivedCommand);
|
|
250 }
|
160
|
251 }
|
144
|
252
|
164
|
253 break;
|
144
|
254
|
8
|
255 case REP.SMCMD_SM_JOIN:
|
164
|
256
|
160
|
257 {
|
122
|
258 //SessionManagerのリストへ追加
|
83
|
259 smList.add(channel);
|
144
|
260
|
122
|
261 //XMLからSessionListオブジェクトを生成する。
|
77
|
262 SessionXMLDecoder decoder = new SessionXMLDecoder();
|
79
|
263 SessionList receivedSessionList = decoder.decode(receivedCommand.string);
|
144
|
264
|
122
|
265 //SessionListへ追加し変換テーブルを生成する。
|
163
|
266 //sessionlist.update(channel, receivedSessionList);
|
144
|
267
|
122
|
268 //myHost を設定。
|
178
|
269 //立ち上げ時にやるとlocalhostしか取れない
|
76
|
270 if(myHost == null) setMyHostName(getLocalHostName(channel));
|
144
|
271
|
122
|
272 //maxHost を設定。
|
95
|
273 if(setMaxHost(channel, receivedSessionList.getMaxHost())){
|
|
274 sendCommand = new REPCommand();
|
|
275 sendCommand.setCMD(REP.SMCMD_CH_MASTER);
|
|
276 sendCommand.setString(maxHost);
|
|
277 smList.sendExcept(channel, sendCommand);
|
|
278 }
|
144
|
279
|
122
|
280 //SessionListからXMLを生成。
|
|
281 //joinしてきたSessionManagerに対してACKを送信。
|
164
|
282 SessionXMLEncoder sessionlistEncoder = new SessionXMLEncoder(sessionList);
|
78
|
283 sendCommand = new REPCommand();
|
|
284 sendCommand.setCMD(REP.SMCMD_SM_JOIN_ACK);
|
|
285 sendCommand.setString(sessionlistEncoder.sessionListToXML());
|
178
|
286 send.write(sendCommand);
|
144
|
287
|
122
|
288 //その他の SessionManager に対して SMCMD_UPDATEを 送信。
|
78
|
289 sendCommand = new REPCommand();
|
83
|
290 sendCommand.setCMD(REP.SMCMD_UPDATE);
|
78
|
291 sendCommand.setString(receivedCommand.string);
|
|
292 smList.sendExcept(channel, sendCommand);
|
144
|
293
|
160
|
294 }
|
164
|
295 break;
|
144
|
296
|
8
|
297 case REP.SMCMD_SM_JOIN_ACK:
|
144
|
298
|
122
|
299 //XMLからSessionListオブジェクトを生成。
|
82
|
300 SessionXMLDecoder decoder2 = new SessionXMLDecoder();
|
|
301 SessionList receivedSessionList2 = decoder2.decode(receivedCommand.string);
|
144
|
302
|
122
|
303 //maxHostを決定。
|
95
|
304 if(setMaxHost(channel, receivedSessionList2.getMaxHost())){
|
|
305 sendCommand = new REPCommand();
|
|
306 sendCommand.setCMD(REP.SMCMD_CH_MASTER);
|
|
307 sendCommand.setString(maxHost);
|
|
308 smList.sendExcept(channel, sendCommand);
|
|
309 }
|
144
|
310
|
6
|
311 break;
|
144
|
312
|
8
|
313 case REP.SMCMD_UPDATE:
|
144
|
314
|
99
|
315 SessionXMLDecoder decoder3 = new SessionXMLDecoder();
|
|
316 SessionList receivedSessionList3 = decoder3.decode(receivedCommand.string);
|
144
|
317
|
122
|
318 //SessionListへ追加し変換テーブルを生成する。
|
163
|
319 //sessionlist.update(channel, receivedSessionList3);
|
179
|
320 sessionList.add(new Session(new Editor(channel)));
|
178
|
321
|
99
|
322 smList.sendExcept(channel, receivedCommand);
|
144
|
323
|
100
|
324 for(Session session3 : receivedSessionList3.getList()){
|
178
|
325 //gui.update();
|
100
|
326 gui.setComboSession(session3.getSID(), session3.getName());
|
|
327 }
|
144
|
328
|
9
|
329 break;
|
144
|
330
|
9
|
331 case REP.SMCMD_UPDATE_ACK:
|
164
|
332 if(receivedCommand.sid > sessionList.size()){
|
148
|
333 Editor editor = new Editor(channel);
|
75
|
334 editor.setName(receivedCommand.string);
|
144
|
335
|
158
|
336 Session session = new Session(editor);
|
73
|
337 session.addEditor(editor);
|
144
|
338
|
164
|
339 sessionList.add(session);
|
144
|
340
|
83
|
341 gui.setComboSession(session.getSID(), session.getName());
|
73
|
342 }
|
75
|
343 smList.sendToSlave(receivedCommand);
|
1
|
344 break;
|
144
|
345
|
95
|
346 case REP.SMCMD_CH_MASTER:
|
122
|
347 //maxHost を設定。
|
95
|
348 if(setMaxHost(channel, receivedCommand.string)){
|
|
349 sendCommand = new REPCommand();
|
|
350 sendCommand.setCMD(REP.SMCMD_CH_MASTER);
|
|
351 sendCommand.setString(maxHost);
|
|
352 smList.sendExcept(channel, sendCommand);
|
|
353 }
|
|
354 break;
|
144
|
355
|
0
|
356 default:
|
164
|
357 {
|
144
|
358 //sid から Session を取得
|
158
|
359 Session session = getSession(receivedCommand.sid);
|
144
|
360 //マージの処理と次のエディタへコマンドを送信する処理
|
|
361 session.translate(channel, receivedCommand);
|
164
|
362
|
178
|
363
|
167
|
364 Editor editor = session.getEditor(channel);
|
|
365 Editor prevEditor = session.getPrevEditor(editor);
|
|
366
|
179
|
367 //マージ中は前のエディタからのコマンドを受信しない
|
164
|
368 if(editor.isMerging()){
|
|
369 //Handlerを切り替える
|
167
|
370 setMergeState(prevEditor.getChannel(), session.getSID());
|
169
|
371 }else {
|
178
|
372 setNormalState(prevEditor.getChannel(), session.getSID());
|
164
|
373 }
|
|
374 }
|
144
|
375 break;
|
|
376 }
|
|
377 }
|
|
378
|
169
|
379 private void setNormalState(REPSocketChannel<REPCommand> channel, int sid) {
|
|
380 SelectionKey key = channel.keyFor(selector);
|
|
381 key.attach(new REPHandlerImpl(sid, this));
|
|
382 }
|
|
383
|
167
|
384 private void setMergeState(REPSocketChannel<REPCommand> channel, int sid) {
|
|
385 SelectionKey key = channel.keyFor(selector);
|
|
386 key.attach(new REPHandlerInMerge(sid, this));
|
164
|
387 }
|
|
388
|
160
|
389 private Editor getEditor(String hostport) {
|
178
|
390 for(Editor editor : editorList){
|
|
391 if(editor.getHost() == hostport){
|
|
392 return editor;
|
|
393 }
|
|
394 }
|
|
395 return null;
|
|
396 }
|
|
397
|
|
398 public Editor getEditor(REPSocketChannel channel){
|
|
399 for(Editor editor : editorList){
|
|
400 if(editor.getChannel() == channel){
|
|
401 return editor;
|
|
402 }
|
|
403 }
|
160
|
404 return null;
|
|
405 }
|
|
406
|
144
|
407 private Session getSession(int sid) {
|
|
408 for(Session session : sessionList){
|
|
409 if(session.getSID() == sid) return session;
|
|
410 }
|
|
411 return null;
|
0
|
412 }
|
83
|
413
|
139
|
414 private boolean setMaxHost(REPSocketChannel channel, String maxHost2) {
|
179
|
415 if(maxHost.compareTo(maxHost2) > 0){
|
|
416 return false;
|
|
417 }else{
|
|
418 maxHost = maxHost2;
|
|
419 return true;
|
|
420 }
|
139
|
421 }
|
|
422
|
76
|
423 private void setMyHostName(String localHostName) {
|
95
|
424 myHost = localHostName + temp_port;
|
81
|
425 if(maxHost == null) {
|
|
426 maxHost = myHost;
|
|
427 }
|
164
|
428 setHostToEditor(myHost);
|
|
429 }
|
|
430
|
|
431 private void setHostToEditor(String myHost2) {
|
|
432 for(Editor editor : editorList){
|
|
433 editor.setHost(myHost2);
|
|
434 }
|
76
|
435 }
|
0
|
436
|
|
437 public static void main(String[] args) throws InterruptedException, IOException {
|
191
|
438
|
|
439 REPServerSocketChannel.isSimulation = true;
|
|
440
|
101
|
441 int port = DEFAULT_PORT;
|
|
442 int port_s = DEFAULT_PORT;
|
113
|
443 //System.setProperty("file.encoding", "UTF-8");
|
82
|
444 if(args.length > 0){
|
39
|
445 port = Integer.parseInt(args[0]);
|
95
|
446 port_s = Integer.parseInt(args[1]);
|
0
|
447 }
|
95
|
448 temp_port = port;
|
|
449 send_port = port_s;
|
0
|
450 SessionManager sm = new SessionManager(port);
|
2
|
451 sm.openSelector();
|
155
|
452 sm.init(port);
|
191
|
453 sm.startGUI(sm);
|
155
|
454 sm.mainLoop();
|
191
|
455
|
0
|
456 }
|
|
457
|
191
|
458 private void startGUI(SessionManager sm) {
|
|
459 gui = new SessionManagerGUI(this);
|
83
|
460 Thread th = new Thread( gui );
|
2
|
461 th.start();
|
|
462 }
|
|
463
|
178
|
464 public void connectSession(String host) {
|
101
|
465 int port = DEFAULT_PORT;
|
95
|
466 port = send_port;
|
1
|
467 InetSocketAddress addr = new InetSocketAddress(host, port);
|
|
468 try {
|
186
|
469 REPSocketChannel<REPCommand> sessionchannel = REPSocketChannel.<REPCommand>create(new REPCommandPacker());
|
1
|
470 sessionchannel.configureBlocking(true);
|
|
471 sessionchannel.connect(addr);
|
6
|
472 while(!sessionchannel.finishConnect()){
|
77
|
473 System.out.print("test afro");
|
6
|
474 }
|
|
475 System.out.println("");
|
2
|
476 registerChannel(selector, sessionchannel, SelectionKey.OP_READ);
|
45
|
477
|
77
|
478 sm_join(sessionchannel);
|
45
|
479
|
1
|
480 }catch (IOException e) {
|
|
481 e.printStackTrace();
|
|
482 }
|
|
483 }
|
77
|
484
|
164
|
485 private void sm_join(REPSocketChannel<REPCommand> channel){
|
79
|
486
|
122
|
487 //SM_JOINコマンドを生成。
|
77
|
488 REPCommand command = new REPCommand();
|
|
489 command.setCMD(REP.SMCMD_SM_JOIN);
|
79
|
490
|
122
|
491 //hostnameをセット。
|
82
|
492 setMyHostName(getLocalHostName(channel));
|
|
493
|
122
|
494 //XMLを生成。送信コマンドにセット。
|
164
|
495 SessionXMLEncoder encoder = new SessionXMLEncoder(sessionList);
|
77
|
496 String string = encoder.sessionListToXML();
|
|
497 command.setString(string);
|
|
498
|
122
|
499 //SM_JOINコマンドを送信。
|
186
|
500 channel.write(command);
|
122
|
501 //SessionManagerのListに追加。
|
77
|
502 smList.add(channel);
|
|
503 }
|
2
|
504
|
139
|
505 private String getLocalHostName(REPSocketChannel channel) {
|
74
|
506 String host = null;
|
|
507 host = channel.socket().getLocalAddress().getHostName();
|
|
508 return host;
|
|
509 }
|
|
510
|
2
|
511 public void connectionOccured(ConnectionEvent event) {
|
178
|
512 try {
|
|
513 waitingQueue.put(event);
|
|
514 } catch (InterruptedException e) {
|
|
515 }
|
|
516 selector.wakeup();
|
2
|
517 }
|
8
|
518
|
|
519 public void ActionOccured(REPActionEvent event) {
|
104
|
520
|
163
|
521 REPSocketChannel<REPCommand> channel = event.getEditorChannel();
|
107
|
522 int sid = event.getSID();
|
164
|
523 Session session = getSession(sid);
|
158
|
524 if(session.hasOwner()){
|
148
|
525 Editor editor = new Editor(channel);
|
|
526 session.addEditor(new Editor(channel));
|
107
|
527 REPCommand sendCommand = new REPCommand();
|
|
528 sendCommand.setCMD(REP.SMCMD_JOIN_ACK);
|
148
|
529 sendCommand.setEID(editor.getEID());
|
107
|
530 sendCommand.setSID(sid);
|
186
|
531 channel.write(sendCommand);
|
107
|
532 }else {
|
164
|
533 REPSocketChannel<REPCommand> editorChannel = event.getEditorChannel();
|
107
|
534 sid = event.getSID();
|
|
535 Editor editor = new Editor(editorChannel);
|
|
536 editor.setHost(myHost);
|
164
|
537 session = getSession(sid);
|
107
|
538 session.addEditor(editor);
|
|
539
|
158
|
540 Editor owner = session.getOwner();
|
107
|
541
|
|
542 REPCommand command = new REPCommand();
|
|
543 command.setCMD(REP.SMCMD_SELECT);
|
|
544 command.setSID(sid);
|
178
|
545 command.setString(editor.getHost());
|
107
|
546 owner.send(command);
|
|
547 }
|
72
|
548
|
|
549
|
8
|
550 }
|
122
|
551
|
144
|
552 public void addWaitingCommand(PacketSet set) {
|
155
|
553 packetSetList.add(set);
|
144
|
554 }
|
148
|
555
|
185
|
556 public List<Session> getSessionList() {
|
|
557 // TODO Auto-generated method stub
|
|
558 return sessionList;
|
|
559 }
|
|
560
|
|
561 public List<Editor> getEditorList() {
|
|
562 // TODO Auto-generated method stub
|
|
563 return editorList;
|
|
564 }
|
|
565
|
0
|
566 }
|