|
From: Peter P. <pr...@us...> - 2006-11-27 16:25:08
|
Update of /cvsroot/pyxida/Pyxida/src/edu/harvard/syrah/pyxida In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22326/src/edu/harvard/syrah/pyxida Modified Files: Pyxida.java Log Message: Fixed problem with missing port numbers Index: Pyxida.java =================================================================== RCS file: /cvsroot/pyxida/Pyxida/src/edu/harvard/syrah/pyxida/Pyxida.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Pyxida.java 27 Nov 2006 15:34:40 -0000 1.10 --- Pyxida.java 27 Nov 2006 16:24:59 -0000 1.11 *************** *** 1,3 **** ! package edu.harvard.syrah.pyxida; import java.util.Random; --- 1,3 ---- ! package edu.harvard.syrah.pyxida; import java.util.Random; *************** *** 19,27 **** private static final Log log = new Log(Pyxida.class); ! private static final String PYXIDA_VERSION = "0.1"; ! public static final String PYXIDA_CONFIG_FILE = System ! .getProperty("pyxida.config", "config/pyxida.cfg"); private static Pyxida pyxida = null; --- 19,29 ---- private static final Log log = new Log(Pyxida.class); ! private static final String VERSION = "0.1"; ! private static final String CONFIG_FILE = System.getProperty("pyxida.config", ! "config/pyxida.cfg"); + public static final int COMM_PORT = Integer.parseInt(Config.getConfigProps().getProperty("pyxida.port", "55500")); + private static Pyxida pyxida = null; *************** *** 31,45 **** private ObjCommIF comm; ! public static Random random; ! private Pyxida() { /* empty */} private void init() { ! random = new Random(System.currentTimeMillis()); // Initiliase the ObjComm communication module comm = new ObjComm(); ! int port = Integer.parseInt(Config.getConfigProps().getProperty("pyxida.port", "55500")); ! AddressIF objCommAddr = AddressFactory.createServer(port); comm.initServer(objCommAddr, new CB0() { protected void cb(CBResult result) { --- 33,47 ---- private ObjCommIF comm; ! public static Random random; ! private Pyxida() { /* empty */ } private void init() { ! random = new Random(System.currentTimeMillis()); // Initiliase the ObjComm communication module comm = new ObjComm(); ! AddressIF objCommAddr = AddressFactory.createServer(COMM_PORT); ! log.debug("Starting objcomm server..."); comm.initServer(objCommAddr, new CB0() { protected void cb(CBResult result) { *************** *** 48,55 **** --- 50,59 ---- // Initialise the measurement modules pingManager = new PingManager(); + log.debug("Initialising the PingManager..."); pingManager.init(new CB0() { protected void cb(CBResult result) { // Initialise the NCs that we're responsible for ncManager = new NCManager(comm, pingManager); + log.debug("Initialising the NCManger..."); ncManager.init(new CB0() { protected void cb(CBResult result) { *************** *** 67,71 **** } } ! } }); } --- 71,75 ---- } } ! } }); } *************** *** 79,84 **** } } ! } ! }); } --- 83,88 ---- } } ! } ! }); } *************** *** 87,91 **** */ public static void main(String[] args) { ! log.main("Pyxida Version " + PYXIDA_VERSION + " starting..."); // TODO JTL: do you GetOpt magic here --- 91,95 ---- */ public static void main(String[] args) { ! log.main("Pyxida Version " + VERSION + " starting..."); // TODO JTL: do you GetOpt magic here *************** *** 99,105 **** args = newArgs; } ! // Read the config file ! String configFileName = PYXIDA_CONFIG_FILE; if (args.length == 1) { configFileName = args[0]; --- 103,109 ---- args = newArgs; } ! // Read the config file ! String configFileName = CONFIG_FILE; if (args.length == 1) { configFileName = args[0]; |