1 18 package org.apache.activemq.ra; 19 20 import javax.resource.spi.endpoint.MessageEndpointFactory ; 21 22 23 public class ActiveMQEndpointActivationKey { 24 final private MessageEndpointFactory messageEndpointFactory; 25 final private MessageActivationSpec activationSpec; 26 27 30 public MessageActivationSpec getActivationSpec() { 31 return activationSpec; 32 } 33 34 37 public MessageEndpointFactory getMessageEndpointFactory() { 38 return messageEndpointFactory; 39 } 40 41 44 ActiveMQEndpointActivationKey() { 45 this(null, null); 46 } 47 48 52 public ActiveMQEndpointActivationKey(MessageEndpointFactory messageEndpointFactory, MessageActivationSpec activationSpec) { 53 this.messageEndpointFactory = messageEndpointFactory; 54 this.activationSpec = activationSpec; 55 } 56 57 60 public int hashCode() { 61 return messageEndpointFactory.hashCode() ^ activationSpec.hashCode(); 62 } 63 64 67 public boolean equals(Object obj) { 68 if (this == obj) { 69 return true; 70 } 71 if (obj == null) { 72 return false; 73 } 74 ActiveMQEndpointActivationKey o = (ActiveMQEndpointActivationKey) obj; 75 76 return o.activationSpec == activationSpec && o.messageEndpointFactory == messageEndpointFactory; 80 } 81 } 82 | Popular Tags |