added simple semaphore file mechanism for session directory.
[vamsas.git] / src / org / vamsas / client / ClientHandle.java
index 5f3a77e..76666f9 100644 (file)
@@ -18,6 +18,7 @@ public class ClientHandle implements Serializable {
     super();
     this.clientName = clientName;
     this.version = version;
+    this.setClientUrn("vamsas://"+clientName+":"+version+"/"); // TODO: decide on application handle ornthing (used to prefix new ids made by a particular application)
   }
   /**
    * (non-unique) human readable vamsas client name
@@ -84,4 +85,13 @@ public class ClientHandle implements Serializable {
   public void setClientName(String clientName) {
     this.clientName = clientName;
   }
+
+  public boolean equals(Object that) {
+    if (that instanceof ClientHandle)
+      return this.equals((ClientHandle) that); 
+    return false;
+  }
+  public boolean equals(ClientHandle that) {
+    return (clientName.equals(that.clientName) && version.equals(that.version) && clientUrn.equals(that.clientUrn));
+  }
 }