1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
package org.mule.module.jca; |
12 | |
|
13 | |
import javax.resource.spi.endpoint.MessageEndpointFactory; |
14 | |
|
15 | |
|
16 | |
|
17 | |
|
18 | |
public class MuleEndpointKey |
19 | |
{ |
20 | |
final private MessageEndpointFactory messageEndpointFactory; |
21 | |
final private MuleActivationSpec activationSpec; |
22 | |
|
23 | |
|
24 | |
|
25 | |
|
26 | |
|
27 | |
public MuleEndpointKey(MessageEndpointFactory messageEndpointFactory, MuleActivationSpec activationSpec) |
28 | 12 | { |
29 | 12 | this.messageEndpointFactory = messageEndpointFactory; |
30 | 12 | this.activationSpec = activationSpec; |
31 | 12 | } |
32 | |
|
33 | |
|
34 | |
|
35 | |
|
36 | |
public MuleActivationSpec getActivationSpec() |
37 | |
{ |
38 | 0 | return activationSpec; |
39 | |
} |
40 | |
|
41 | |
|
42 | |
|
43 | |
|
44 | |
public MessageEndpointFactory getMessageEndpointFactory() |
45 | |
{ |
46 | 0 | return messageEndpointFactory; |
47 | |
} |
48 | |
|
49 | |
|
50 | |
|
51 | |
|
52 | |
public int hashCode() |
53 | |
{ |
54 | 12 | return messageEndpointFactory.hashCode() ^ activationSpec.hashCode(); |
55 | |
} |
56 | |
|
57 | |
|
58 | |
|
59 | |
|
60 | |
public boolean equals(Object obj) |
61 | |
{ |
62 | 6 | if (this == obj) |
63 | |
{ |
64 | 0 | return true; |
65 | |
} |
66 | |
|
67 | 6 | if (obj == null) |
68 | |
{ |
69 | 0 | return false; |
70 | |
} |
71 | |
|
72 | 6 | if (this.getClass() != obj.getClass()) |
73 | |
{ |
74 | 0 | return false; |
75 | |
} |
76 | |
|
77 | 6 | MuleEndpointKey o = (MuleEndpointKey)obj; |
78 | 6 | return o.activationSpec == activationSpec && o.messageEndpointFactory == messageEndpointFactory; |
79 | |
} |
80 | |
|
81 | |
public String toString() |
82 | |
{ |
83 | 0 | return "MuleEndpointKey{" + "messageEndpointFactory=" + messageEndpointFactory + ", activationSpec=" |
84 | |
+ activationSpec + "}"; |
85 | |
} |
86 | |
} |