--- /dev/null
+package and.hpcvm;
+
+import java.io.Serializable;
+import java.rmi.RemoteException;
+
+public class ConnectedClient implements Serializable
+{
+ private static final long serialVersionUID = 1L;
+ private ServicesClient stub ;
+ private int timeout ;
+ private Status state ;
+ private String ip ;
+ private String name ;
+ private ComputingClient cl ;
+
+ ConnectedClient( ServicesClient _stub )
+ {
+ stub = _stub ;
+ timeout = 0 ;
+ state = new Status() ;
+ state.setStatus( "connected" ) ;
+ try {
+ ip = stub.getIPHost() ;
+ name = stub.getName() ;
+ } catch (RemoteException e) {
+ e.printStackTrace();
+ }
+ cl = null ;
+ }
+
+ protected ServicesClient getStub() { return stub ; }
+
+ protected void setStub( ServicesClient _stub ) { stub = _stub ; }
+
+ protected int getTimeout() { return timeout ; }
+
+ protected void incTimeout() { timeout++ ; }
+
+ protected void resetTimeout() { timeout = 0 ; }
+
+ protected String getStatus() { return state.getStatus() ; }
+
+ protected void setStatus( String _state ) { state.setStatus( _state ) ; }
+
+ protected String getIP() { return ip ; }
+
+ protected String getName() { return name ; } ;
+
+ protected void setComputingClient( ComputingClient _cl ) { cl = _cl ; }
+
+ protected ComputingClient getComputingClient() { return cl ; }
+}