38
|
1 package jungle.test.bbs;
|
|
2
|
|
3 import javax.servlet.Servlet;
|
|
4
|
40
|
5 import jungle.test.bbs.codesegment.PutAnotherLogCodeSegment;
|
|
6 import jungle.test.bbs.codesegment.PutHostLogCodeSegment;
|
42
|
7 import jungle.test.bbs.codesegment.StartBBSCodeSegment;
|
40
|
8
|
38
|
9 import org.mortbay.jetty.Server;
|
|
10 import org.mortbay.jetty.servlet.ServletHandler;
|
|
11 import org.mortbay.jetty.servlet.ServletHolder;
|
|
12
|
39
|
13 import alice.daemon.AliceDaemon;
|
|
14 import alice.datasegment.DataSegment;
|
|
15 import alice.jungle.codesegment.LogUpdateCodeSegment;
|
|
16 import alice.jungle.remote.RemoteConfig;
|
42
|
17 import alice.topology.node.StartTopologyNode;
|
|
18 import alice.topology.node.TopologyNode;
|
39
|
19
|
38
|
20 /**
|
|
21 * Hello world!
|
|
22 *
|
|
23 */
|
39
|
24 public class DistributeApp
|
38
|
25 {
|
|
26 public static void main( String[] args ) throws Exception
|
|
27 {
|
42
|
28
|
39
|
29 RemoteConfig conf = new RemoteConfig(args);
|
42
|
30 new TopologyNode(conf, new StartBBSCodeSegment());
|
|
31 /*
|
40
|
32 if(conf.hostname == null) {
|
|
33 new AliceDaemon(conf).listen();
|
|
34 PutHostLogCodeSegment cs = new PutHostLogCodeSegment();
|
|
35 cs.arg1.setKey("local","log");
|
42
|
36 LogUpdateCodeSegment updateCS = new LogUpdateCodeSegment("local", "anotherLog");
|
|
37 updateCS.arg1.setKey("local", "anotherLog");
|
40
|
38 } else {
|
39
|
39 DataSegment.connect(conf.key, "", conf.hostname, conf.connectPort);
|
42
|
40 PutAnotherLogCodeSegment cs = new PutAnotherLogCodeSegment();
|
|
41 cs.arg1.setKey("local", "log");
|
|
42 LogUpdateCodeSegment updateCS = new LogUpdateCodeSegment("remote", "hostLog");
|
|
43 updateCS.arg1.setKey("remote", "hostLog");
|
39
|
44 }
|
42
|
45 */
|
38
|
46 }
|
|
47 }
|