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