view src/main/java/app/bbs/DistributeApp.java @ 153:69b5565c4a63

no use toporogy
author tatsuki
date Sat, 05 Jul 2014 18:28:40 +0900
parents dacfa7eba841
children cd4d64249931
line wrap: on
line source

package app.bbs;

import java.util.HashMap;
import java.util.LinkedList;

import alice.jungle.remote.RemoteConfig;
import alice.topology.HostMessage;
import alice.topology.manager.IncomingHosts;
import alice.topology.manager.NodeInfo;
import alice.topology.node.TopologyNode;
import app.bbs.codesegment.StartBBSCodeSegment;

public class DistributeApp {
    public static void main(String[] args) throws Exception {
        RemoteConfig conf = new RemoteConfig(args);
        if (conf.getManagerHostName() == null) {
            String localHostName ="localhost";
            HostMessage host = new HostMessage(localHostName, conf.localPort);
            StartBBSCodeSegment cs1 = new StartBBSCodeSegment(args, conf.bbsPort);
            cs1.ods.put("host", "node0");
        } else {
            new TopologyNode(conf, new StartBBSCodeSegment(args, conf.bbsPort));
        }
    }
}