222
|
1 package rep;
|
|
2
|
316
|
3 import java.io.IOException;
|
|
4
|
222
|
5 import rep.channel.REPSocketChannel;
|
|
6
|
246
|
7 public class SelectButtonEvent implements SessionManagerEvent{
|
222
|
8
|
246
|
9 private REPSocketChannel<REPCommand> editorChannel;
|
222
|
10 private int sid;
|
|
11 private int eid;
|
252
|
12 private SessionManager manager;
|
222
|
13
|
316
|
14 public SelectButtonEvent(Forwarder editor, Session session, SessionManagerEventListener listener) {
|
227
|
15 this.editorChannel = editor.getChannel();
|
|
16 this.eid = editor.getEID();
|
|
17 this.sid = session.getSID();
|
252
|
18 this.manager = (SessionManager)listener;
|
222
|
19 }
|
|
20
|
246
|
21 public REPSocketChannel<REPCommand> getEditorChannel() {
|
222
|
22 return editorChannel;
|
|
23 }
|
|
24
|
|
25 public int getSID() {
|
|
26 return sid;
|
|
27 }
|
|
28
|
|
29 public int getEID() {
|
|
30 return eid;
|
|
31 }
|
|
32
|
|
33 public void exec() {
|
316
|
34 try {
|
|
35 manager.selectSession(this);
|
|
36 } catch (IOException e) {
|
|
37 }
|
222
|
38 }
|
|
39
|
|
40 }
|