1 10 11 package org.mule.ra; 12 13 import javax.resource.spi.endpoint.MessageEndpointFactory ; 14 15 18 public class MuleEndpointKey 19 { 20 final private MessageEndpointFactory messageEndpointFactory; 21 final private MuleActivationSpec activationSpec; 22 23 27 public MuleEndpointKey(MessageEndpointFactory messageEndpointFactory, MuleActivationSpec activationSpec) 28 { 29 this.messageEndpointFactory = messageEndpointFactory; 30 this.activationSpec = activationSpec; 31 } 32 33 36 public MuleActivationSpec getActivationSpec() 37 { 38 return activationSpec; 39 } 40 41 44 public MessageEndpointFactory getMessageEndpointFactory() 45 { 46 return messageEndpointFactory; 47 } 48 49 52 public int hashCode() 53 { 54 return messageEndpointFactory.hashCode() ^ activationSpec.hashCode(); 55 } 56 57 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 } 87 | Popular Tags |