Clover coverage report -
Coverage timestamp: Sat Jul 7 2007 16:41:13 CEST
file stats: LOC: 53   Methods: 1
NCLOC: 23   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
RemoteTestListener.java 50% 100% 100% 92.9%
coverage coverage
 1    /*
 2    * JTRunner is free software; you can redistribute it and/or modify it under the
 3    * terms of the GNU General Public License as published by the Free Software
 4    * Foundation; either version 2, or (at your option) any later version.
 5    */
 6   
 7    package jtr.remote.test;
 8   
 9    import java.rmi.registry.Registry;
 10   
 11    import jtr.remote.test.impl.TestGateway;
 12    import jtr.remote.utils.RmiUtil;
 13    import org.apache.log4j.Logger;
 14    import org.apache.log4j.xml.DOMConfigurator;
 15   
 16    import static jtr.test.SystemProperties.*;
 17   
 18    /**
 19    * This class is the laucher of the JTR runtime that should be used for those
 20    * JTR nodes deployed for accepting test configurations originated at other
 21    * <i>active</i> JTR nodes.
 22    *
 23    * @author frusso
 24    * @version 4.0
 25    * @since 4.0
 26    */
 27    public class RemoteTestListener {
 28   
 29    /**
 30    * This method launches the <i>JTR Gateway Service</i>, the service in charge
 31    * of accepting test-configurations originated from other <i>active</i> JTR
 32    * nodes.
 33    * @param args
 34    */
 35  1 public static void main(String[] args) {
 36  1 RmiUtil.setSystemProperties();
 37  1 String log4jConfig = System.getProperty(LOG4J_CONFIGURATION);
 38  1 if (log4jConfig != null) {
 39  1 DOMConfigurator.configure(log4jConfig);
 40    }
 41   
 42  1 String host = System.getProperty(RMI_REGISTRY_HOST, DEF_RMI_REGISTRY_HOST);
 43  1 int port = new Integer(System.getProperty(RMI_REGISTRY_PORT, DEF_RMI_REGISTRY_PORT.toString()));
 44   
 45  1 logger.info("Instantiated a new RemoteTestListener");
 46  1 Registry registry = RmiUtil.launchRegistry(host,port);
 47  1 RmiUtil.registerService(registry,TestGateway.class,TEST_GW_SERVICE_NAME);
 48  1 logger.info("JTR-TestGatewayService launched");
 49  1 RmiUtil.logRegistryContent(registry);
 50    }
 51   
 52    private static Logger logger = Logger.getLogger(RemoteTestListener.class);
 53    }