3 package org.vamsas.client;
5 import java.io.Serializable;
8 * Uniquely describes a vamsas client application.
11 public class ClientHandle implements Serializable {
12 static final long serialVersionUID = 0;
17 public ClientHandle(String clientName, String version) {
19 this.clientName = clientName;
20 this.version = version;
21 this.setClientUrn("vamsas://"+clientName+":"+version+"/"); // TODO: decide on application handle ornthing (used to prefix new ids made by a particular application)
24 * (non-unique) human readable vamsas client name
29 * the unambiguous client identifier
30 * This may be rewritten by the Vorba object if
31 * other clients with the same name, version
32 * and user are involved in a session.
38 * version modifier to tag application space
43 * @return Returns the clientUrn.
45 public String getClientUrn() {
50 * May become protected - should only be set by a Vorba object.
52 * The clientUrn to set.
54 public void setClientUrn(String clientUrn) {
55 this.clientUrn = clientUrn;
59 * @return Returns the version.
61 public String getVersion() {
69 public void setVersion(String version) {
70 this.version = version;
75 * @return Returns the clientName.
77 public String getClientName() {
83 * The clientName to set.
85 public void setClientName(String clientName) {
86 this.clientName = clientName;
89 public boolean equals(Object that) {
90 if (that instanceof ClientHandle)
91 return this.equals((ClientHandle) that);
94 public boolean equals(ClientHandle that) {
95 return (clientName.equals(that.clientName) && version.equals(that.version) && clientUrn.equals(that.clientUrn));