1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package org.apache.geronimo.connector.outbound;
19
20
21
22
23
24
25
26
27
28 public class ConnectionInfo {
29
30 private ManagedConnectionInfo mci;
31 private Object connection;
32 private Object connectionProxy;
33 private boolean unshareable;
34 private boolean applicationManagedSecurity;
35 private Exception trace;
36
37 public ConnectionInfo() {
38 }
39
40 public ConnectionInfo(ManagedConnectionInfo mci) {
41 this.mci = mci;
42 }
43
44
45
46
47
48 public ManagedConnectionInfo getManagedConnectionInfo() {
49 return mci;
50 }
51
52
53
54
55
56 public void setManagedConnectionInfo(ManagedConnectionInfo mci) {
57 this.mci = mci;
58 }
59
60
61
62
63
64 public Object getConnectionHandle() {
65 return connection;
66 }
67
68
69
70
71
72 public void setConnectionHandle(Object connection) {
73 assert this.connection == null;
74 this.connection = connection;
75 }
76
77 public Object getConnectionProxy() {
78 return connectionProxy;
79 }
80
81 public void setConnectionProxy(Object connectionProxy) {
82 this.connectionProxy = connectionProxy;
83 }
84
85 public boolean isUnshareable() {
86 return unshareable;
87 }
88
89 public void setUnshareable(boolean unshareable) {
90 this.unshareable = unshareable;
91 }
92
93 public boolean isApplicationManagedSecurity() {
94 return applicationManagedSecurity;
95 }
96
97 public void setApplicationManagedSecurity(boolean applicationManagedSecurity) {
98 this.applicationManagedSecurity = applicationManagedSecurity;
99 }
100
101 public boolean equals(Object obj) {
102 if (obj == this) {
103 return true;
104 }
105 if (obj instanceof ConnectionInfo) {
106 ConnectionInfo other = (ConnectionInfo) obj;
107 return (connection == other.connection)
108 && (mci == other.mci);
109 }
110 return false;
111 }
112
113 public int hashCode() {
114 return ((connection != null) ? connection.hashCode() : 7) ^
115 ((mci != null) ? mci.hashCode() : 7);
116 }
117
118 public void setTrace() {
119 this.trace = new Exception("Stack Trace");
120 }
121
122 public Exception getTrace() {
123 return trace;
124 }
125
126
127
128 }