0
|
1 package rep;
|
|
2
|
1
|
3 import java.nio.channels.SocketChannel;
|
|
4 import java.util.LinkedList;
|
|
5 import java.util.List;
|
|
6
|
0
|
7 public class Session {
|
1
|
8 Editor masterEditor;
|
|
9 private int sessionID;
|
|
10 private String sessionName;
|
|
11 private LinkedList<Editor> editorList = new LinkedList<Editor>();
|
|
12 public Session(int sessionID, String string, SocketChannel channel) {
|
|
13 masterEditor = new Editor(sessionID, channel);
|
|
14 this.sessionID = sessionID;
|
|
15 this.sessionName = string;
|
|
16 }
|
|
17 public void addEditor(int editorID, SocketChannel channel) {
|
|
18 editorList.add(new Editor(editorID, channel));
|
|
19 }
|
|
20 public LinkedList getEditorList() {
|
|
21 return editorList;
|
|
22 }
|
3
|
23 public String toString(){
|
|
24 return sessionName;
|
|
25 }
|
0
|
26 }
|