Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Refunding the restart mechanism.
[hpcvm.git] / src / and / hpcvm / SaveNeighbor.java
diff --git a/src/and/hpcvm/SaveNeighbor.java b/src/and/hpcvm/SaveNeighbor.java
new file mode 100644 (file)
index 0000000..a1d668d
--- /dev/null
@@ -0,0 +1,38 @@
+package and.hpcvm ;
+
+import java.io.Serializable;
+import java.rmi.RemoteException;
+
+
+public class SaveNeighbor implements Serializable
+{
+       private static final long serialVersionUID = 1L;
+       private ServicesClient sc ;
+       private String ip ;
+       private String name ;
+       private String wd ;
+       
+       public SaveNeighbor( ServicesClient _sc ) throws RemoteException
+       {
+               super() ;
+               
+               sc = _sc ;
+               try {
+                       ip = sc.getIPHost() ;
+                       name = sc.getName() ;
+                       wd = sc.getWorkingDirectory() ;
+               } catch( RemoteException e ) {
+                       System.err.println( "Unable to retrieve inforation one save neighbor!" ) ;
+                       e.printStackTrace() ;
+               }
+       }
+               
+       protected String getIPHost() { return ip ; }
+       
+       protected String getName() { return name ; }
+       
+       protected String getWorkingDirectory() { return wd ; }
+       
+       protected ServicesClient getStub() { return sc ; }
+               
+}
\ No newline at end of file