1 17 18 package org.apache.geronimo.connector.outbound; 19 20 28 public class ConnectionInfo { 29 30 private ManagedConnectionInfo mci; 31 private Object connection; 32 private boolean unshareable; 33 private boolean applicationManagedSecurity; 34 private Exception trace; 35 36 public ConnectionInfo() { 37 } 39 public ConnectionInfo(ManagedConnectionInfo mci) { 40 this.mci = mci; 41 } 42 43 47 public ManagedConnectionInfo getManagedConnectionInfo() { 48 return mci; 49 } 50 51 55 public void setManagedConnectionInfo(ManagedConnectionInfo mci) { 56 this.mci = mci; 57 } 58 59 63 public Object getConnectionHandle() { 64 return connection; 65 } 66 67 71 public void setConnectionHandle(Object connection) { 72 assert this.connection == null; 73 this.connection = connection; 74 } 75 76 public boolean isUnshareable() { 77 return unshareable; 78 } 79 80 public void setUnshareable(boolean unshareable) { 81 this.unshareable = unshareable; 82 } 83 84 public boolean isApplicationManagedSecurity() { 85 return applicationManagedSecurity; 86 } 87 88 public void setApplicationManagedSecurity(boolean applicationManagedSecurity) { 89 this.applicationManagedSecurity = applicationManagedSecurity; 90 } 91 92 public boolean equals(Object obj) { 93 if (obj == this) { 94 return true; 95 } 96 if (obj instanceof ConnectionInfo) { 97 ConnectionInfo other = (ConnectionInfo) obj; 98 return (connection == other.connection) 99 && (mci == other.mci); 100 } 101 return false; 102 } 103 104 public int hashCode() { 105 return ((connection != null) ? connection.hashCode() : 7) ^ 106 ((mci != null) ? mci.hashCode() : 7); 107 } 108 109 public void setTrace() { 110 this.trace = new Exception ("Stack Trace"); 111 } 112 113 public Exception getTrace() { 114 return trace; 115 } 116 117 118 119 } | Popular Tags |