Update of /cvsroot/pyxida/Pyxida/src/edu/harvard/syrah/pyxida
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26090/src/edu/harvard/syrah/pyxida
Modified Files:
Pyxida.java
Log Message:
Continued to carve out the class framework
Index: Pyxida.java
===================================================================
RCS file: /cvsroot/pyxida/Pyxida/src/edu/harvard/syrah/pyxida/Pyxida.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Pyxida.java 20 Nov 2006 17:22:31 -0000 1.3
--- Pyxida.java 21 Nov 2006 21:15:00 -0000 1.4
***************
*** 6,16 ****
import edu.harvard.syrah.prp.Log;
import edu.harvard.syrah.pyxida.api.APIManager;
! import edu.harvard.syrah.pyxida.api.APIManagerIF;
! import edu.harvard.syrah.pyxida.nc.NCClient;
! import edu.harvard.syrah.pyxida.nc.NCClientIF;
import edu.harvard.syrah.pyxida.ping.PingManager;
! import edu.harvard.syrah.pyxida.ping.PingManagerIF;
import edu.harvard.syrah.sbon.async.EventLoop;
! import edu.harvard.syrah.sbon.comm.AddressIF;
public class Pyxida {
--- 6,14 ----
import edu.harvard.syrah.prp.Log;
import edu.harvard.syrah.pyxida.api.APIManager;
! import edu.harvard.syrah.pyxida.nc.NCManager;
import edu.harvard.syrah.pyxida.ping.PingManager;
! import edu.harvard.syrah.sbon.async.CBResult;
import edu.harvard.syrah.sbon.async.EventLoop;
! import edu.harvard.syrah.sbon.async.CallbacksIF.CB0;
public class Pyxida {
***************
*** 19,25 ****
private static final String PYXIDA_VERSION = "0.1";
- // TODO read from config file
- private static final int NC_NUM_DIMS = 3;
-
private static Properties configProps = System.getProperties();
public static Properties getConfigProps() { return configProps; }
--- 17,20 ----
***************
*** 28,49 ****
private static Pyxida pyxida = null;
! private NCClientIF ncClient = null;
! private APIManagerIF apiManager = null;
! private PingManagerIF pingManager = null;
private Pyxida() { /* empty */ }
! private void init() {
! // Initialise the network coordinate calculation
! ncClient = new NCClient<AddressIF>(NC_NUM_DIMS);
! //ncClient.init();
!
// Initialise the measurement modules
pingManager = new PingManager();
! pingManager.init();
!
! // Initialise the external APIs
! apiManager = new APIManager();
! apiManager.init();
}
--- 23,46 ----
private static Pyxida pyxida = null;
! private NCManager ncManager = null;
! private APIManager apiManager = null;
! private PingManager pingManager = null;
private Pyxida() { /* empty */ }
! private void init() {
// Initialise the measurement modules
pingManager = new PingManager();
! pingManager.init(new CB0() {
! protected void cb(CBResult result) {
! // Initialise the NCs that we're responsible for
! ncManager = new NCManager(pingManager);
! ncManager.init();
!
! // Initialise the external APIs
! apiManager = new APIManager(ncManager);
! apiManager.init();
! }
! });
}
***************
*** 53,62 ****
public static void main(String[] args) {
log.main("Pyxida Version " + PYXIDA_VERSION + " starting...");
!
// Turn on assertions
boolean assertsEnabled = false;
assert assertsEnabled = true;
if (!assertsEnabled)
! log.warn("Please run the code with assertions turned on: java -ea ...");
// Turn on colour support
--- 50,61 ----
public static void main(String[] args) {
log.main("Pyxida Version " + PYXIDA_VERSION + " starting...");
!
! Log.setPackageRoot(Pyxida.class);
!
// Turn on assertions
boolean assertsEnabled = false;
assert assertsEnabled = true;
if (!assertsEnabled)
! log.error("Please run the code with assertions turned on: java -ea ...");
// Turn on colour support
|