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

[or-cvs] r15616: Prepare to move some files to make classnames clearer (in puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi: . execute impl)



Author: sebastian
Date: 2008-07-03 02:08:49 -0400 (Thu, 03 Jul 2008)
New Revision: 15616

Added:
   puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/LocalPuppeTorMaster.java
   puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/PuppeTorMaster.java
Modified:
   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/RemotePuppeTor.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/RemotePuppeTorImpl.java
   puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/impl/RemotePuppeTorImplFactory.java
Log:
Prepare to move some files to make classnames clearer

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-03 05:30:33 UTC (rev 15615)
+++ puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/AbstractRemotePuppeTorFactory.java	2008-07-03 06:08:49 UTC (rev 15616)
@@ -40,21 +40,21 @@
  *
  * @author Sebastian Hahn
  */
-public abstract class AbstractRemotePuppeTorFactory {
+public abstract class AbstractPuppeTorMasterFactory {
 
     /**
      * Hold the concrete RemotePuppeTorFactory that will be used to create
      * <code>RemotePuppeTor</code> instances. Uses
      * <code>AbstractRemotePuppeTorFactory.class</code> for locking.
      */
-    private static AbstractRemotePuppeTorFactory factory;
+    private static AbstractPuppeTorMasterFactory factory;
 
     /**
      * @return a new concrete
      *         <code>AbstractRemotePuppeTorFactory<code>subclass as
      *     specified by the initialization
      */
-    final public synchronized static AbstractRemotePuppeTorFactory getInstance() {
+    final public synchronized static AbstractPuppeTorMasterFactory getInstance() {
         return factory;
     }
 
@@ -63,9 +63,9 @@
      *            save this as the factory if this hasn't been called before.
      */
     final public synchronized static void initialize(
-            final AbstractRemotePuppeTorFactory factory) {
-        if (AbstractRemotePuppeTorFactory.factory == null) {
-            AbstractRemotePuppeTorFactory.factory = factory;
+            final AbstractPuppeTorMasterFactory factory) {
+        if (AbstractPuppeTorMasterFactory.factory == null) {
+            AbstractPuppeTorMasterFactory.factory = factory;
         }
     }
 
@@ -76,6 +76,6 @@
      *            Create the server represantation for this connected slave
      * @return The new <code>RemotePuppeTor</code> instance
      */
-    public abstract RemotePuppeTor createRemotePuppeTor(PuppeTorSlave slave)
+    public abstract RemotePuppeTorMaster createRemotePuppeTor(PuppeTorSlave slave)
             throws RemoteException;
 }

Added: puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/LocalPuppeTorMaster.java
===================================================================
--- puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/LocalPuppeTorMaster.java	                        (rev 0)
+++ puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/LocalPuppeTorMaster.java	2008-07-03 06:08:49 UTC (rev 15616)
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2008, Sebastian Hahn
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * 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
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+ package de.uniba.wiai.lspi.puppetor.rmi;
+
+public interface LocalPuppeTorMaster {
+
+}

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-03 05:30:33 UTC (rev 15615)
+++ puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/MasterConnector.java	2008-07-03 06:08:49 UTC (rev 15616)
@@ -52,6 +52,6 @@
      * @return The representation of the master
      * @throws RemoteException
      */
-    public RemotePuppeTor registerClient(final PuppeTorSlave slave)
+    public RemotePuppeTorMaster registerClient(final PuppeTorSlave slave)
             throws RemoteException;
 }

Added: puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/PuppeTorMaster.java
===================================================================
--- puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/PuppeTorMaster.java	                        (rev 0)
+++ puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/PuppeTorMaster.java	2008-07-03 06:08:49 UTC (rev 15616)
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2008, Sebastian Hahn
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * 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
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package de.uniba.wiai.lspi.puppetor.rmi;
+
+public interface PuppeTorMaster extends LocalPuppeTorMaster,
+        RemotePuppeTorMaster {
+
+}

Modified: puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/RemotePuppeTor.java
===================================================================
--- puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/RemotePuppeTor.java	2008-07-03 05:30:33 UTC (rev 15615)
+++ puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/RemotePuppeTor.java	2008-07-03 06:08:49 UTC (rev 15616)
@@ -47,7 +47,7 @@
  *
  * @author Sebastian Hahn
  */
-public interface RemotePuppeTor extends Remote {
+public interface RemotePuppeTorMaster extends Remote {
 
     /**
      * Slaves that must poll because they are not reachable can use this method

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-03 05:30:33 UTC (rev 15615)
+++ puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/execute/PuppeTorMasterProgram.java	2008-07-03 06:08:49 UTC (rev 15616)
@@ -39,11 +39,11 @@
 import javax.rmi.ssl.SslRMIClientSocketFactory;
 import javax.rmi.ssl.SslRMIServerSocketFactory;
 
-import de.uniba.wiai.lspi.puppetor.rmi.AbstractRemotePuppeTorFactory;
+import de.uniba.wiai.lspi.puppetor.rmi.AbstractPuppeTorMasterFactory;
 import de.uniba.wiai.lspi.puppetor.rmi.MasterConnector;
 import de.uniba.wiai.lspi.puppetor.rmi.PuppeTorSlave;
-import de.uniba.wiai.lspi.puppetor.rmi.RemotePuppeTor;
-import de.uniba.wiai.lspi.puppetor.rmi.impl.RemotePuppeTorImplFactory;
+import de.uniba.wiai.lspi.puppetor.rmi.RemotePuppeTorMaster;
+import de.uniba.wiai.lspi.puppetor.rmi.impl.PuppeTorMasterImplFactory;
 
 /**
  * The <code>PuppeTorMasterProgram</code> contains the main method for the
@@ -104,8 +104,8 @@
         // 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());
+        AbstractPuppeTorMasterFactory
+                .initialize(new PuppeTorMasterImplFactory());
 
         try {
             master = new InnerMasterConnector();
@@ -157,10 +157,10 @@
         public InnerMasterConnector() throws RemoteException {
         }
 
-        public RemotePuppeTor registerClient(final PuppeTorSlave slave)
+        public RemotePuppeTorMaster registerClient(final PuppeTorSlave slave)
                 throws RemoteException {
-            final AbstractRemotePuppeTorFactory fact =
-                    AbstractRemotePuppeTorFactory.getInstance();
+            final AbstractPuppeTorMasterFactory fact =
+                    AbstractPuppeTorMasterFactory.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-03 05:30:33 UTC (rev 15615)
+++ puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/execute/PuppeTorSlaveProgram.java	2008-07-03 06:08:49 UTC (rev 15616)
@@ -45,7 +45,7 @@
 import de.uniba.wiai.lspi.puppetor.rmi.MasterConnector;
 import de.uniba.wiai.lspi.puppetor.rmi.PuppeTorSlave;
 import de.uniba.wiai.lspi.puppetor.rmi.PuppeTorTest;
-import de.uniba.wiai.lspi.puppetor.rmi.RemotePuppeTor;
+import de.uniba.wiai.lspi.puppetor.rmi.RemotePuppeTorMaster;
 import de.uniba.wiai.lspi.puppetor.rmi.impl.PuppeTorSlaveImplFactory;
 
 /**
@@ -64,7 +64,7 @@
      * 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;
+    volatile private RemotePuppeTorMaster master;
 
     /**
      * The port the master server is supposed to listen on. This port must not

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-03 05:30:33 UTC (rev 15615)
+++ puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/impl/RemotePuppeTorImpl.java	2008-07-03 06:08:49 UTC (rev 15616)
@@ -38,9 +38,9 @@
 import java.util.concurrent.ConcurrentHashMap;
 
 import de.uniba.wiai.lspi.puppetor.rmi.CreateNetwork;
+import de.uniba.wiai.lspi.puppetor.rmi.PuppeTorMaster;
 import de.uniba.wiai.lspi.puppetor.rmi.PuppeTorSlave;
 import de.uniba.wiai.lspi.puppetor.rmi.PuppeTorTest;
-import de.uniba.wiai.lspi.puppetor.rmi.RemotePuppeTor;
 
 /**
  * Represent the master at the slave, and give the master a way to interact with
@@ -48,8 +48,8 @@
  *
  * @author Sebastian Hahn
  */
-public class RemotePuppeTorImpl extends UnicastRemoteObject implements
-        RemotePuppeTor, Unreferenced {
+public class PuppeTorMasterImpl extends UnicastRemoteObject implements
+        PuppeTorMaster, Unreferenced {
 
     /**
      * Required for serialization. Needs to change for new released versions.
@@ -75,7 +75,7 @@
      *             RMI
      * @throws IllegalArgumentException
      */
-    public RemotePuppeTorImpl(final PuppeTorSlave slave) throws RemoteException {
+    public PuppeTorMasterImpl(final PuppeTorSlave slave) throws RemoteException {
         if (null != slaves.putIfAbsent(slave.getName(), slave)) {
             throw new IllegalArgumentException(slave.getName()
                     + " has already registered with this Server");

Modified: puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/impl/RemotePuppeTorImplFactory.java
===================================================================
--- puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/impl/RemotePuppeTorImplFactory.java	2008-07-03 05:30:33 UTC (rev 15615)
+++ puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/impl/RemotePuppeTorImplFactory.java	2008-07-03 06:08:49 UTC (rev 15616)
@@ -32,24 +32,24 @@
 package de.uniba.wiai.lspi.puppetor.rmi.impl;
 
 import java.rmi.RemoteException;
-import de.uniba.wiai.lspi.puppetor.rmi.AbstractRemotePuppeTorFactory;
+import de.uniba.wiai.lspi.puppetor.rmi.AbstractPuppeTorMasterFactory;
 import de.uniba.wiai.lspi.puppetor.rmi.PuppeTorSlave;
-import de.uniba.wiai.lspi.puppetor.rmi.RemotePuppeTor;
+import de.uniba.wiai.lspi.puppetor.rmi.RemotePuppeTorMaster;
 
 /**
  * Create <code>RemotePuppeTorImpl</code> instances
  *
  * @author Sebastian Hahn
  */
-public class RemotePuppeTorImplFactory extends AbstractRemotePuppeTorFactory {
+public class PuppeTorMasterImplFactory extends AbstractPuppeTorMasterFactory {
 
     /**
      * @return a new <code>RemotePuppeTorImpl</code> instance.
      */
     @Override
-    public RemotePuppeTor createRemotePuppeTor(final PuppeTorSlave slave)
+    public RemotePuppeTorMaster createRemotePuppeTor(final PuppeTorSlave slave)
             throws RemoteException {
-        return new RemotePuppeTorImpl(slave);
+        return new PuppeTorMasterImpl(slave);
     }
 
 }