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 {
29 this.messageEndpointFactory = messageEndpointFactory;
30 this.activationSpec = activationSpec;
31 }
32
33
34
35
36 public MuleActivationSpec getActivationSpec()
37 {
38 return activationSpec;
39 }
40
41
42
43
44 public MessageEndpointFactory getMessageEndpointFactory()
45 {
46 return messageEndpointFactory;
47 }
48
49
50
51
52 public int hashCode()
53 {
54 return messageEndpointFactory.hashCode() ^ activationSpec.hashCode();
55 }
56
57
58
59
60 public boolean equals(Object obj)
61 {
62 if (this == obj)
63 {
64 return true;
65 }
66
67 if (obj == null)
68 {
69 return false;
70 }
71
72 if (this.getClass() != obj.getClass())
73 {
74 return false;
75 }
76
77 MuleEndpointKey o = (MuleEndpointKey)obj;
78 return o.activationSpec == activationSpec && o.messageEndpointFactory == messageEndpointFactory;
79 }
80
81 public String toString()
82 {
83 return "MuleEndpointKey{" + "messageEndpointFactory=" + messageEndpointFactory + ", activationSpec="
84 + activationSpec + "}";
85 }
86 }