comparison rep/SessionManager.java @ 391:3b0a5a55e3ee

24
author one@firefly.cr.ie.u-ryukyu.ac.jp
date Mon, 10 Nov 2008 22:25:14 +0900
parents 4b535bef903a
children 85d01cb6d133
comparison
equal deleted inserted replaced
390:aa07134fea32 391:3b0a5a55e3ee
21 import rep.handler.REPNode; 21 import rep.handler.REPNode;
22 import rep.handler.FirstConnector; 22 import rep.handler.FirstConnector;
23 import rep.handler.Forwarder; 23 import rep.handler.Forwarder;
24 import rep.xml.SessionXMLDecoder; 24 import rep.xml.SessionXMLDecoder;
25 import rep.xml.SessionXMLEncoder; 25 import rep.xml.SessionXMLEncoder;
26 import test.sematest.TestGUI;
26 27
27 /* 28 /*
28 +-------+--------+--------+-------+--------+---------+------+ 29 +-------+--------+--------+-------+--------+---------+------+
29 | cmd | session| editor | seqid | lineno | textsiz | text | 30 | cmd | session| editor | seqid | lineno | textsiz | text |
30 | | id | id | | | | | 31 | | id | id | | | | |
47 SessionList sessionList = new SessionList(); 48 SessionList sessionList = new SessionList();
48 // Known Session Manager List, At most one parent. No parent means master. 49 // Known Session Manager List, At most one parent. No parent means master.
49 SessionManagerList smList = new SessionManagerList(); 50 SessionManagerList smList = new SessionManagerList();
50 // Known Editor list. Connected Editor has a channel. 51 // Known Editor list. Connected Editor has a channel.
51 // Session Manager Channel may have dummy editors. 52 // Session Manager Channel may have dummy editors.
52 EditorList editorList = new EditorList(); 53 public EditorList editorList = new EditorList();
53 // Queue limit for debugging purpose. 54 // Queue limit for debugging purpose.
54 static final int packetLimit = 400; 55 static final int packetLimit = 400;
55 56
56 // globalSessionID = SessionManagerID * MAXID + localSessionID 57 // globalSessionID = SessionManagerID * MAXID + localSessionID
57 private static final int MAXID = 10000; 58 private static final int MAXID = 10000;
601 602
602 public void addWaitingSessionManager(REPNode fw, REPCommand command) { 603 public void addWaitingSessionManager(REPNode fw, REPCommand command) {
603 smList.addWaitingSessionManager(fw, command); 604 smList.addWaitingSessionManager(fw, command);
604 } 605 }
605 606
607 public int getId() {
608 return smList.sessionManagerID();
609 }
610
606 } 611 }