1 46 47 package org.mr.kernel.security; 48 49 import org.mr.core.util.UUID; 50 51 60 public class SessionID { 61 private UUID _id; 62 63 67 public SessionID(){ 68 _id = createID(); 69 } 70 71 79 public boolean equals(Object obj){ 80 if (!(obj instanceof SessionID)) 81 return false; 82 SessionID other = (SessionID) obj; 83 return (_id == other._id); 84 } 85 86 92 public int hashCode(){ 93 return _id.hashCode(); 94 } 95 96 101 public String toString(){ 102 return _id.toString(); 103 } 104 105 private UUID createID(){ 106 return UUID.randomUUID(); 107 } 108 } 109 | Popular Tags |