1 23 package org.objectweb.joram.client.connector; 24 25 26 30 public class ConnectionRequest 31 implements javax.resource.spi.ConnectionRequestInfo 32 { 33 37 protected String userName; 38 42 protected String password; 43 44 45 51 public ConnectionRequest(String userName, String password) 52 { 53 this.userName = userName; 54 this.password = password; 55 } 56 57 58 62 public String getUserName() 63 { 64 return userName; 65 } 66 67 71 public String getPassword() 72 { 73 return password; 74 } 75 76 77 81 public boolean equals(Object o) 82 { 83 if (! (o instanceof ConnectionRequest)) 84 return false; 85 86 ConnectionRequest other = (ConnectionRequest) o; 87 return this.getClass().getName().equals(o.getClass().getName()) 88 && other.getUserName().equals(userName); 89 } 90 91 92 public int hashCode() 93 { 94 return ("Unified:" + userName).hashCode(); 95 } 96 } 97 | Popular Tags |