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