--- projects/cms/source/host/java/JavaHost.java 2000/11/27 20:36:20 1.2 +++ projects/cms/source/host/java/JavaHost.java 2000/12/07 23:20:15 1.4 @@ -7,8 +7,8 @@ * Designed to be used as a working design to build the C++ hosts on. * Hopefully fully functional and thus can be used as part of a test rig. * - * @author $Author: ab11 $ - * @version $Id: JavaHost.java,v 1.2 2000/11/27 20:36:20 ab11 Exp $ + * @author $Author: tdb $ + * @version $Id: JavaHost.java,v 1.4 2000/12/07 23:20:15 tdb Exp $ */ class JavaHost { @@ -20,26 +20,35 @@ class JavaHost { /** * Constructor for the class. Takes in the hostname and port number - * of the Configuration Manager. + * of the Filter Manager. * */ public JavaHost( String serverName, int port ){ - // create a connection to the configurator + // create a connection to the filter manager + System.out.println("Creating connection with Filter Manager"); Config config = new Config(serverName, port); // the config class knows what values it wants to get from - // the configurator + // the configuration system - // create a SystemMonitor object and pass the confifurator + // create a SystemMonitor object and pass the config // as a param so it knows what to do! + System.out.println("Creating System Monitor"); SystemMonitor sysMon = new SystemMonitor(config); while ( true ){ // keep going for ever and ever ;) // send a udp packet to the filter declared in config // send it the xml packet created by getInfo() - LowLevelNet.sendUDPPacket(config, sysMon.getInfo()); - } + System.out.println("Sending UDP Packet"); + LowLevelNet.sendUDPPacket(config, sysMon.getInfo()); + config.sendHeartBeat(); + if ( config.reloadConfig() ){ + System.out.println("Resarting System"); + break; + } + } // while + } // public javahost