Mercurial > hg > RemoteEditor > REPSessionManager
comparison rep/SessionList.java @ 317:c83a3faec487
*** empty log message ***
author | kono |
---|---|
date | Tue, 07 Oct 2008 21:48:31 +0900 |
parents | 77f443f6dc9f |
children | dfed28488274 |
comparison
equal
deleted
inserted
replaced
316:77f443f6dc9f | 317:c83a3faec487 |
---|---|
46 // sessionLinkedList.add(new Session(sessionID, string, channel)); | 46 // sessionLinkedList.add(new Session(sessionID, string, channel)); |
47 return sessionID; | 47 return sessionID; |
48 | 48 |
49 } | 49 } |
50 | 50 |
51 public void addEditor(REPSocketChannel<REPCommand> channel, int sid, REPCommand repCmd) { | 51 public void addEditor(SessionManager manager,REPSocketChannel<REPCommand> channel, int sid, REPCommand repCmd) { |
52 int editorID = repCmd.eid; | 52 int editorID = repCmd.eid; |
53 // if(session3.get(sid) == null) System.out.println("ぬるぽ!"); | 53 // if(session3.get(sid) == null) System.out.println("ぬるぽ!"); |
54 // session3.get(sid).addEditor(editorID, channel); | 54 // session3.get(sid).addEditor(editorID, channel); |
55 sessionLinkedList.get(sid-1).addEditor(editorID, channel); //本当はforループで検索しないといけないよ。 | 55 sessionLinkedList.get(sid-1).addEditor(manager,editorID, channel); //本当はforループで検索しないといけないよ。 |
56 } | 56 } |
57 | 57 |
58 // public int getSessionID(SocketChannel channel) { | 58 // public int getSessionID(SocketChannel channel) { |
59 // return 0; | 59 // return 0; |
60 // } | 60 // } |
111 } | 111 } |
112 return "{}"; | 112 return "{}"; |
113 } | 113 } |
114 | 114 |
115 | 115 |
116 public void addEditor(REPSocketChannel<REPCommand> editorChannel, int sid, int eid) { | 116 public void addEditor(SessionManager manager,REPSocketChannel<REPCommand> editorChannel, int sid, int eid) { |
117 // session3.get(sid).addEditor(eid, editorChannel); | 117 // session3.get(sid).addEditor(eid, editorChannel); |
118 sessionLinkedList.get(sid-1).addEditor(eid, editorChannel); | 118 sessionLinkedList.get(sid-1).addEditor(manager,eid, editorChannel); |
119 } | 119 } |
120 | 120 |
121 public void sendSelect(int sid) { | 121 public void sendSelect(int sid) { |
122 // SocketChannel channel = session3.get(sid).getMaster().getChannel(); | 122 // SocketChannel channel = session3.get(sid).getMaster().getChannel(); |
123 REPSocketChannel<REPCommand> channel = sessionLinkedList.get(sid-1).getOwner().getChannel(); | 123 REPSocketChannel<REPCommand> channel = sessionLinkedList.get(sid-1).getOwner().getChannel(); |