annotate test/sematest/TestSessionManager.java @ 220:216d64cd5f3a

*** empty log message ***
author pin
date Sun, 31 Aug 2008 11:19:59 +0900
parents 827c439d0da4
children b837feb00132
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
189
d03e34861a26 *** empty log message ***
pin
parents:
diff changeset
1 package test.sematest;
d03e34861a26 *** empty log message ***
pin
parents:
diff changeset
2
192
6fb97c7a0b42 *** empty log message ***
pin
parents: 189
diff changeset
3 import java.io.IOException;
189
d03e34861a26 *** empty log message ***
pin
parents:
diff changeset
4 import rep.SessionManager;
192
6fb97c7a0b42 *** empty log message ***
pin
parents: 189
diff changeset
5 import rep.channel.REPLogger;
189
d03e34861a26 *** empty log message ***
pin
parents:
diff changeset
6 import rep.channel.REPServerSocketChannel;
193
311847db7429 *** empty log message ***
pin
parents: 192
diff changeset
7
189
d03e34861a26 *** empty log message ***
pin
parents:
diff changeset
8
d03e34861a26 *** empty log message ***
pin
parents:
diff changeset
9 public class TestSessionManager {
d03e34861a26 *** empty log message ***
pin
parents:
diff changeset
10
192
6fb97c7a0b42 *** empty log message ***
pin
parents: 189
diff changeset
11 static public REPLogger logger = REPLogger.singleton();
189
d03e34861a26 *** empty log message ***
pin
parents:
diff changeset
12
192
6fb97c7a0b42 *** empty log message ***
pin
parents: 189
diff changeset
13 public TestSessionManager(int sm, int ss, int e) {
189
d03e34861a26 *** empty log message ***
pin
parents:
diff changeset
14 }
d03e34861a26 *** empty log message ***
pin
parents:
diff changeset
15
d03e34861a26 *** empty log message ***
pin
parents:
diff changeset
16 private void startTest() {
213
4d9b32666ed2 *** empty log message ***
pin
parents: 193
diff changeset
17 int masterPort = 8766;
192
6fb97c7a0b42 *** empty log message ***
pin
parents: 189
diff changeset
18 String[] strs ={String.valueOf(masterPort), String.valueOf(masterPort)};
6fb97c7a0b42 *** empty log message ***
pin
parents: 189
diff changeset
19 startSessionManager(strs);
6fb97c7a0b42 *** empty log message ***
pin
parents: 189
diff changeset
20 }
189
d03e34861a26 *** empty log message ***
pin
parents:
diff changeset
21
192
6fb97c7a0b42 *** empty log message ***
pin
parents: 189
diff changeset
22 private void startSessionManager(final String[] strs) {
6fb97c7a0b42 *** empty log message ***
pin
parents: 189
diff changeset
23 new Thread(new Runnable(){
6fb97c7a0b42 *** empty log message ***
pin
parents: 189
diff changeset
24 public void run(){
6fb97c7a0b42 *** empty log message ***
pin
parents: 189
diff changeset
25 try {
6fb97c7a0b42 *** empty log message ***
pin
parents: 189
diff changeset
26 SessionManager.main(strs);
6fb97c7a0b42 *** empty log message ***
pin
parents: 189
diff changeset
27 } catch (InterruptedException e) {
6fb97c7a0b42 *** empty log message ***
pin
parents: 189
diff changeset
28 e.printStackTrace();
6fb97c7a0b42 *** empty log message ***
pin
parents: 189
diff changeset
29 } catch (IOException e) {
6fb97c7a0b42 *** empty log message ***
pin
parents: 189
diff changeset
30 e.printStackTrace();
6fb97c7a0b42 *** empty log message ***
pin
parents: 189
diff changeset
31 }
6fb97c7a0b42 *** empty log message ***
pin
parents: 189
diff changeset
32 }
6fb97c7a0b42 *** empty log message ***
pin
parents: 189
diff changeset
33 }).start();
189
d03e34861a26 *** empty log message ***
pin
parents:
diff changeset
34 }
d03e34861a26 *** empty log message ***
pin
parents:
diff changeset
35
220
216d64cd5f3a *** empty log message ***
pin
parents: 218
diff changeset
36 public static void main(String[] args){
216d64cd5f3a *** empty log message ***
pin
parents: 218
diff changeset
37 REPServerSocketChannel.isSimulation = false;
216d64cd5f3a *** empty log message ***
pin
parents: 218
diff changeset
38 TestSessionManager test = new TestSessionManager(1, 0, 2);
216d64cd5f3a *** empty log message ***
pin
parents: 218
diff changeset
39 logger.setLogLevel(5);
216d64cd5f3a *** empty log message ***
pin
parents: 218
diff changeset
40 test.startTest();
216d64cd5f3a *** empty log message ***
pin
parents: 218
diff changeset
41 }
216d64cd5f3a *** empty log message ***
pin
parents: 218
diff changeset
42
189
d03e34861a26 *** empty log message ***
pin
parents:
diff changeset
43 }