1 2 24 25 package com.lutris.appserver.server.sessionEnhydra; 26 27 28 29 39 public class SessionThread { 40 41 public Thread thread; 42 public String sessionKey; 43 44 50 public SessionThread(Thread thread, String sessionKey) { 51 this.thread = thread; 52 this.sessionKey = sessionKey; 53 } 54 55 61 public boolean equals(Object sessionThread) { 62 if (!(sessionThread instanceof SessionThread)) { 63 return false; 64 } 65 SessionThread s = (SessionThread)sessionThread; 66 return (thread.equals(s.thread) 67 && sessionKey.equals(s.sessionKey)); 68 } 69 70 73 public String toString() { 74 return thread.toString() + "-" + sessionKey; 75 } 76 77 80 public int hashCode() { 81 return sessionKey.hashCode(); 82 } 83 } 84 85 | Popular Tags |