[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r15593: Synchronize factories. Clean up. go to university. (in puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi: . execute impl)



Author: sebastian
Date: 2008-07-02 06:05:13 -0400 (Wed, 02 Jul 2008)
New Revision: 15593

Modified:
   puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/AbstractPuppeTorSlaveFactory.java
   puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/AbstractRemotePuppeTorFactory.java
   puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/MasterConnector.java
   puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/execute/PuppeTorMasterProgram.java
   puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/execute/PuppeTorSlaveProgram.java
   puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/impl/PuppeTorSlaveImpl.java
   puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/impl/RemotePuppeTorImpl.java
Log:
Synchronize factories. Clean up. go to university.

Modified: puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/AbstractPuppeTorSlaveFactory.java
===================================================================
--- puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/AbstractPuppeTorSlaveFactory.java	2008-07-02 09:33:54 UTC (rev 15592)
+++ puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/AbstractPuppeTorSlaveFactory.java	2008-07-02 10:05:13 UTC (rev 15593)
@@ -44,26 +44,27 @@
 
     /**
      * Hold the concrete RemotePuppeTorFactory that will be used to create
-     * <code>RemotePuppeTor</code> instances. Uses
-     * AbstractPuppeTorSlaveFactory.class for locking.
+     * <code>PuppeTorSlave</code> instances. Uses
+     * <code>AbstractPuppeTorSlaveFactory.class</code> for locking.
      */
-    volatile private static AbstractPuppeTorSlaveFactory factory;
+    private static AbstractPuppeTorSlaveFactory factory;
 
     /**
      * @return a new concrete
      *         <code>AbstractPuppeTorSlaveFactory<code>subclass as
      *     specified by the initialization
      */
-    final public static AbstractPuppeTorSlaveFactory getInstance() {
+    final public synchronized static AbstractPuppeTorSlaveFactory getInstance() {
         return factory;
     }
 
     /**
      * @param factory
-     *         save this as the factory if this hasn't been called before.
-     * XXX - We could throw an exception here, too. I will think about that.-SH   
+     *            save this as the factory if this hasn't been called before.
+     *            XXX - We could throw an exception here, too. I will think
+     *            about that.-SH
      */
-    final public static void initialize(
+    final public synchronized static void initialize(
             final AbstractPuppeTorSlaveFactory factory) {
         if (AbstractPuppeTorSlaveFactory.factory == null) {
             AbstractPuppeTorSlaveFactory.factory = factory;

Modified: puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/AbstractRemotePuppeTorFactory.java
===================================================================
--- puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/AbstractRemotePuppeTorFactory.java	2008-07-02 09:33:54 UTC (rev 15592)
+++ puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/AbstractRemotePuppeTorFactory.java	2008-07-02 10:05:13 UTC (rev 15593)
@@ -44,16 +44,17 @@
 
     /**
      * Hold the concrete RemotePuppeTorFactory that will be used to create
-     * <code>RemotePuppeTor</code> instances.
+     * <code>RemotePuppeTor</code> instances. Uses
+     * <code>AbstractRemotePuppeTorFactory.class</code> for locking.
      */
-    volatile private static AbstractRemotePuppeTorFactory factory;
+    private static AbstractRemotePuppeTorFactory factory;
 
     /**
      * @return a new concrete
      *         <code>AbstractRemotePuppeTorFactory<code>subclass as
      *     specified by the initialization
      */
-    final public static AbstractRemotePuppeTorFactory getInstance() {
+    final public synchronized static AbstractRemotePuppeTorFactory getInstance() {
         return factory;
     }
 
@@ -61,7 +62,7 @@
      * @param factory
      *            save this as the factory if this hasn't been called before.
      */
-    final public static void initialize(
+    final public synchronized static void initialize(
             final AbstractRemotePuppeTorFactory factory) {
         if (AbstractRemotePuppeTorFactory.factory == null) {
             AbstractRemotePuppeTorFactory.factory = factory;

Modified: puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/MasterConnector.java
===================================================================
--- puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/MasterConnector.java	2008-07-02 09:33:54 UTC (rev 15592)
+++ puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/MasterConnector.java	2008-07-02 10:05:13 UTC (rev 15593)
@@ -38,20 +38,20 @@
  * Handle the initial handshake with the slaves and pass them back an object
  * that the slave uses to refer to the master. The master will create exactly
  * one <code>MasterConnector</code>, slaves don't ever need one.
- * 
+ *
  * @author Sebastian Hahn
  */
 public interface MasterConnector extends Remote {
-	
-	/**
-	 * Called once by every connecting client so that the master knows about it
-	 * and has a chance to pass back a representation of itself.
-	 * @param slave
-	 *     A slave representation as passed from the connecting slave
-	 * @return
-	 *     The representation of the master
-	 * @throws RemoteException
-	 */
-	public RemotePuppeTor registerClient
-    ( final PuppeTorSlave slave ) throws RemoteException;
+
+    /**
+     * Called once by every connecting client so that the master knows about it
+     * and has a chance to pass back a representation of itself.
+     *
+     * @param slave
+     *            A slave representation as passed from the connecting slave
+     * @return The representation of the master
+     * @throws RemoteException
+     */
+    public RemotePuppeTor registerClient(final PuppeTorSlave slave)
+            throws RemoteException;
 }

Modified: puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/execute/PuppeTorMasterProgram.java
===================================================================
--- puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/execute/PuppeTorMasterProgram.java	2008-07-02 09:33:54 UTC (rev 15592)
+++ puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/execute/PuppeTorMasterProgram.java	2008-07-02 10:05:13 UTC (rev 15593)
@@ -7,16 +7,16 @@
  *
  *     * Redistributions of source code must retain the above copyright
  * notice, this list of conditions and the following disclaimer.
- * 
+ *
  *     * Redistributions in binary form must reproduce the above
  * copyright notice, this list of conditions and the following disclaimer
  * in the documentation and/or other materials provided with the
  * distribution.
- * 
+ *
  *     * Neither the names of the copyright owners nor the names of its
  * contributors may be used to endorse or promote products derived from
  * this software without specific prior written permission.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
@@ -48,25 +48,25 @@
 /**
  * The <code>PuppeTorMasterProgram</code> contains the main method for the
  * master instance of a distributed PuppeTor testing infrastructure. Currently,
- * configuration of the the master's network settings are implemented as 
- * instance variables of <code>PuppeTorMasterProgram</code>.
- * XXX eventually, using configuration files would be better -SH
- * 
+ * configuration of the the master's network settings are implemented as
+ * instance variables of <code>PuppeTorMasterProgram</code>. XXX eventually,
+ * using configuration files would be better -SH
+ *
  * @author Sebastian Hahn
  */
 public class PuppeTorMasterProgram {
-    
+
     /**
      * The login object for clients
      */
     final private PuppeTorMasterProgram.InnerMasterConnector master;
-    
+
     /**
      * The port the server is supposed to listen on. This port must not be
      * firewalled and must be forwarded to the machine if necessary.
      */
     final private static int serverport = 2050;
-    
+
     /**
      * The address this server should bind on. Use 127.0.0.1 for local testing.
      * XXX Someone should check if this works with IPv6 -SH
@@ -75,40 +75,42 @@
 
     /**
      * Master application entry point
-     * 
+     *
      * @param args
-     *     Command-line arguments - ignored for now.
+     *            Command-line arguments - ignored for now.
      */
     public static void main(final String[] args) {
         final PuppeTorMasterProgram server = new PuppeTorMasterProgram();
         server.exportObject();
 
-        //XXX do stuff with the clients-SH
+        // XXX do stuff with the clients-SH
     }
 
     /**
-     * Private constructor to set up RMI-related Java-internal variables
-     * and create a <code>RemotePuppeTorImpl</code>.
+     * Private constructor to set up RMI-related Java-internal variables and
+     * create a <code>RemotePuppeTorImpl</code>.
      */
     private PuppeTorMasterProgram() {
-        //Set the location of the keystore where your private certificate is.
+        // Set the location of the keystore where your private certificate is.
         System.setProperty("javax.net.ssl.keyStore", "res/keystore");
-        //Set the password for your keystore.
+        // Set the password for your keystore.
         System.setProperty("javax.net.ssl.keyStorePassword", "asdasd");
-        
-        /* Set the location of the truststore which contains the exported
-         * certificates of your slaves. */
+
+        /*
+         * Set the location of the truststore which contains the exported
+         * certificates of your slaves.
+         */
         System.setProperty("javax.net.ssl.trustStore", "res/truststore");
-        //Tell the RMI system the location of the master
+        // Tell the RMI system the location of the master
         System.setProperty("java.rmi.server.hostname", serveraddress);
-        //Set up the factories we want to use
-        AbstractRemotePuppeTorFactory.initialize(
-                new RemotePuppeTorImplFactory());
-        
+        // Set up the factories we want to use
+        AbstractRemotePuppeTorFactory
+                .initialize(new RemotePuppeTorImplFactory());
+
         try {
             master = new InnerMasterConnector();
-        } catch (RemoteException e) {
-            //We cannot do much better here. This is supposed to just work.
+        } catch (final RemoteException e) {
+            // We cannot do much better here. This is supposed to just work.
             e.printStackTrace();
             throw new RuntimeException("Couldn't create remote object. Dying.");
         }
@@ -116,9 +118,9 @@
 
     /**
      * Create an RMI registry that uses SSL-secured Sockets for communication,
-     * requires client authentication, and bind our 
-     * <code>MasterConnector</code> in the registry. If this doesn't work,
-     * most likely the user's system configuration isn't correct.
+     * requires client authentication, and bind our <code>MasterConnector</code>
+     * in the registry. If this doesn't work, most likely the user's system
+     * configuration isn't correct.
      */
     private void exportObject() {
         try {
@@ -130,29 +132,35 @@
             registry.bind("Master", master);
         } catch (final Throwable th) {
             th.printStackTrace();
-            System.out.println("Could not create the registry or bind an" +
-              "object in it. Please check your system's configuration. " + th);
+            System.out
+                    .println("Could not create the registry or bind an"
+                            + "object in it. Please check your system's configuration. "
+                            + th);
             System.exit(1);
         }
     }
-    
-    class InnerMasterConnector extends UnicastRemoteObject implements MasterConnector {
+
+    static class InnerMasterConnector extends UnicastRemoteObject implements
+            MasterConnector {
         /**
-         * Required for serialization. Needs to change for new released versions.
+         * Required for serialization. Needs to change for new released
+         * versions.
          */
         private static final long serialVersionUID = 1L;
 
         /**
          * empty default constructor necessary for the Exception
+         *
          * @throws RemoteException
-         *     RMI
+         *             RMI
          */
-        public InnerMasterConnector() throws RemoteException { }
-        
-        public RemotePuppeTor registerClient
-            ( final PuppeTorSlave slave ) throws RemoteException {
-            AbstractRemotePuppeTorFactory fact = 
-                AbstractRemotePuppeTorFactory.getInstance();
+        public InnerMasterConnector() throws RemoteException {
+        }
+
+        public RemotePuppeTor registerClient(final PuppeTorSlave slave)
+                throws RemoteException {
+            final AbstractRemotePuppeTorFactory fact =
+                    AbstractRemotePuppeTorFactory.getInstance();
             return fact.createRemotePuppeTor(slave);
         }
     }

Modified: puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/execute/PuppeTorSlaveProgram.java
===================================================================
--- puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/execute/PuppeTorSlaveProgram.java	2008-07-02 09:33:54 UTC (rev 15592)
+++ puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/execute/PuppeTorSlaveProgram.java	2008-07-02 10:05:13 UTC (rev 15593)
@@ -7,16 +7,16 @@
  *
  *     * Redistributions of source code must retain the above copyright
  * notice, this list of conditions and the following disclaimer.
- * 
+ *
  *     * Redistributions in binary form must reproduce the above
  * copyright notice, this list of conditions and the following disclaimer
  * in the documentation and/or other materials provided with the
  * distribution.
- * 
+ *
  *     * Neither the names of the copyright owners nor the names of its
  * contributors may be used to endorse or promote products derived from
  * this software without specific prior written permission.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
@@ -50,20 +50,20 @@
  * The <code>PuppeTorSlaveProgram</code> contains the main method for the
  * slave instances of a distributed PuppeTor testing infrastructure. Currently,
  * configuration of the the master's network settings and some slave-specific
- * options are implemented as instance variables of 
- * <code>PuppeTorSlaveProgram</code>.
- * XXX eventually, using configuration files would be better -SH
- * 
+ * options are implemented as instance variables of
+ * <code>PuppeTorSlaveProgram</code>. XXX eventually, using configuration
+ * files would be better -SH
+ *
  * @author Sebastian Hahn
  */
 public class PuppeTorSlaveProgram {
-    
+
     /**
      * The <code>RemotePuppeTor</code> object that is exported by the server.
      * This variable may be written to only from the main thread.
      */
     volatile private RemotePuppeTor master;
-    
+
     /**
      * The port the master server is supposed to listen on. This port must not
      * be firewalled and must be forwarded to the machine if necessary. Use the
@@ -72,18 +72,18 @@
     final private static int serverport = 2050;
 
     /**
-     * The address master server listens on. Use the same value as you used
-     * for the master's configuration.
-     * XXX Someone should check if this works with IPv6 -SH
+     * The address master server listens on. Use the same value as you used for
+     * the master's configuration. XXX Someone should check if this works with
+     * IPv6 -SH
      */
     final private static String serveraddress = "78.47.18.109";
-    
+
     /**
      * Each slave is identified by its unique <code>slaveName</code>. Be
      * careful to prevent naming collisions between slaves.
      */
     final private static String slaveName = "slave1";
-    
+
     /**
      * A representation of this slave node to be sent to the master.
      */
@@ -91,9 +91,9 @@
 
     /**
      * Slave application entry point
-     * 
+     *
      * @param args
-     *     Command-line arguments
+     *            Command-line arguments
      */
     public static void main(final String[] args) {
         final PuppeTorSlaveProgram slave = new PuppeTorSlaveProgram();
@@ -102,24 +102,23 @@
                 Thread.sleep(60000); // wait one minute
             } catch (final InterruptedException e) {
                 // and immediatly retry if we're interrupted.
-                //XXX this isn't a good idea. we should quit.-SH
+                // XXX this isn't a good idea. we should quit.-SH
             }
         }
-        //XXX How about we spawn a thread here that polls for new work and puts
+        // XXX How about we spawn a thread here that polls for new work and puts
         // it in a nice little queue that some worker threads use...
         try {
             final PuppeTorTest job = slave.master.getNewJob();
             if (job != null) {
                 final Object res = job.doJob();
             }
-        } catch (final PuppeTorException e) { 
+        } catch (final PuppeTorException e) {
             e.printStackTrace();
-            System.out
-                    .println("PuppeTor didn't do what we wanted it to do." +
-                    		" For now, that's a fatal error. " + e);
+            System.out.println("PuppeTor didn't do what we wanted it to do."
+                    + " For now, that's a fatal error. " + e);
             System.exit(1);
-        } catch (RemoteException e) {
-            //XXX Need to handle the exception... -SH 
+        } catch (final RemoteException e) {
+            // XXX Need to handle the exception... -SH
         }
     }
 
@@ -135,37 +134,36 @@
          * Set the password for your keystore.
          */
         System.setProperty("javax.net.ssl.keyStorePassword", "asdasd");
-        /* 
+        /*
          * Set the location of the truststore which contains the exported
          * certificates of your slaves
          */
-        System.setProperty("javax.net.ssl.trustStore", "res/truststore");        
-        //Set up the factories we want to use
-        AbstractPuppeTorSlaveFactory.initialize(
-                new PuppeTorSlaveImplFactory());
-        AbstractPuppeTorSlaveFactory fac = AbstractPuppeTorSlaveFactory.getInstance();
-        
+        System.setProperty("javax.net.ssl.trustStore", "res/truststore");
+        // Set up the factories we want to use
+        AbstractPuppeTorSlaveFactory.initialize(new PuppeTorSlaveImplFactory());
+        final AbstractPuppeTorSlaveFactory fac =
+                AbstractPuppeTorSlaveFactory.getInstance();
+
         /*
          * Create a new slave with the properties that are relevant for the
          * computer and networking environment it runs on.
          */
         try {
-            
-            this.slave = fac.createPuppeTorSlave(slaveName);
-        } catch (RemoteException e) {
+
+            slave = fac.createPuppeTorSlave(slaveName);
+        } catch (final RemoteException e) {
             e.printStackTrace();
             throw new RuntimeException("Couldn't creat slave object. Dying.");
         }
-        
+
     }
 
     /**
      * Attempt to make a connection to the master through RMI. If the master is
      * down, that is not a fatal condition, we want to keep trying until we can
      * reach it. Don't call this except from main().
-     * 
-     * @return
-     *     true if the connection was successful, false otherwise.
+     *
+     * @return true if the connection was successful, false otherwise.
      */
     private boolean connectToMaster() {
         try {
@@ -173,22 +171,23 @@
                     LocateRegistry.getRegistry(serveraddress, serverport,
                             new SslRMIClientSocketFactory());
 
-            master = ((MasterConnector)registry.lookup("Master")).registerClient(
-            		this.slave);
+            master =
+                    ((MasterConnector) registry.lookup("Master"))
+                            .registerClient(slave);
         } catch (final NotBoundException e) {
             e.printStackTrace();
-            System.out.println("We could connect, but the master has not " +
-            		"exported the Master Object yet." + e);
+            System.out.println("We could connect, but the master has not "
+                    + "exported the Master Object yet." + e);
             return false;
         } catch (final RemoteException e) {
             e.printStackTrace();
-            //XXX remove the next line once this stabilizes-SH
+            // XXX remove the next line once this stabilizes-SH
             System.out.println("Server down " + e);
             return false;
         } catch (final IllegalArgumentException e) {
             e.printStackTrace();
-            System.out.println("A slave with this name is already connected " +
-              "to the server! " + e);
+            System.out.println("A slave with this name is already connected "
+                    + "to the server! " + e);
             return false;
         }
         return true;

Modified: puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/impl/PuppeTorSlaveImpl.java
===================================================================
--- puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/impl/PuppeTorSlaveImpl.java	2008-07-02 09:33:54 UTC (rev 15592)
+++ puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/impl/PuppeTorSlaveImpl.java	2008-07-02 10:05:13 UTC (rev 15593)
@@ -36,9 +36,9 @@
 /**
  * Describe a client including its capabilities and network location to the
  * master. Also allow the master to query that information. A slave is not
- * required to give more than its name, but it can only be used for very
- * limited tests.
- * 
+ * required to give more than its name, but it can only be used for very limited
+ * tests.
+ *
  * @author Sebastian Hahn
  */
 public final class PuppeTorSlaveImpl implements PuppeTorSlave {
@@ -47,31 +47,30 @@
      * Required for serialization. Needs to change for new released versions.
      */
     private static final long serialVersionUID = 1L;
-    
+
     /**
      * The slave's name
      */
     protected final String name;
 
     /**
-     * This constructor is useful for slaves only, and only if they don't
-     * want to provide any OS-specific or otherwise capability-telling
-     * information.
+     * This constructor is useful for slaves only, and only if they don't want
+     * to provide any OS-specific or otherwise capability-telling information.
+     *
      * @param slaveName
-     *     The slave's name
-     * @throws
-     *     NullPointerException
+     *            The slave's name
+     * @throws NullPointerException
      */
     public PuppeTorSlaveImpl(final String slaveName)
-        throws NullPointerException {
-        if(slaveName == null)
-        	throw new NullPointerException("slaveName must not be null");
+            throws NullPointerException {
+        if (slaveName == null) {
+            throw new NullPointerException("slaveName must not be null");
+        }
         name = slaveName;
     }
 
     /**
-     * @return
-     *     The slave's name
+     * @return The slave's name
      */
     public String getName() {
         return name;

Modified: puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/impl/RemotePuppeTorImpl.java
===================================================================
--- puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/impl/RemotePuppeTorImpl.java	2008-07-02 09:33:54 UTC (rev 15592)
+++ puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/impl/RemotePuppeTorImpl.java	2008-07-02 10:05:13 UTC (rev 15593)
@@ -43,9 +43,9 @@
 import de.uniba.wiai.lspi.puppetor.rmi.RemotePuppeTor;
 
 /**
- * Represent the master at the slave, and give the master a way to interact
- * with the respective slave.
- * 
+ * Represent the master at the slave, and give the master a way to interact with
+ * the respective slave.
+ *
  * @author Sebastian Hahn
  */
 public class RemotePuppeTorImpl extends UnicastRemoteObject implements
@@ -55,13 +55,12 @@
      * Required for serialization. Needs to change for new released versions.
      */
     private static final long serialVersionUID = 1L;
-    
-    
+
     /**
-     * Store the reference to the connected slave 
+     * Store the reference to the connected slave
      */
     private final PuppeTorSlave slave;
-    
+
     /**
      * We store all the connected <code>PuppeTorSlave</code>s here. Make sure
      * the key is never null.
@@ -71,44 +70,42 @@
 
     /**
      * Check the slave object for validity and save it for further reference
+     *
      * @throws RemoteException
-     *     RMI
+     *             RMI
      * @throws IllegalArgumentException
      */
-    public RemotePuppeTorImpl( final PuppeTorSlave slave ) throws RemoteException {
-    	if (null != slaves.putIfAbsent(slave.getName(), slave)) {
+    public RemotePuppeTorImpl(final PuppeTorSlave slave) throws RemoteException {
+        if (null != slaves.putIfAbsent(slave.getName(), slave)) {
             throw new IllegalArgumentException(slave.getName()
                     + " has already registered with this Server");
         }
-    	this.slave = slave;
+        this.slave = slave;
     }
 
     /**
-     *  XXX Currently, there is no logic
-     * to give back useful tasks, but if the client is known, a new 
-     * <code>CreateNetwork</code> test is submitted.-SH
+     * XXX Currently, there is no logic to give back useful tasks, but if the
+     * client is known, a new <code>CreateNetwork</code> test is submitted.-SH
      */
-    public PuppeTorTest getNewJob()
-            throws RemoteException {
+    public PuppeTorTest getNewJob() throws RemoteException {
         return new CreateNetwork();
-        
+
     }
 
-//    public void repoprtResults(final String slaveName,
-//            final PuppeTorTestResult jobResult) throws RemoteException {
-        // XXX We want to let the server know that the client did some work and
-        // how it turned out to be. -SH
-//    }
+    // public void repoprtResults(final String slaveName,
+    // final PuppeTorTestResult jobResult) throws RemoteException {
+    // XXX We want to let the server know that the client did some work and
+    // how it turned out to be. -SH
+    // }
 
     /**
      * Remove the slave from the Map of slaves and destroy its workqueues.
      * Inform the TestRunner that all still-running tests failed because the
-     * slave went away.
-     * XXX Don't just promise to do that - we actually have to do that when
-     * there are the queues that I mentioned.
+     * slave went away. XXX Don't just promise to do that - we actually have to
+     * do that when there are the queues that I mentioned.
      */
     public void unreferenced() {
-    	slaves.remove(this.slave.getName());
+        slaves.remove(slave.getName());
     }
-    
+
 }