1 46 47 package org.mr.ra.inbound; 48 49 import javax.resource.spi.endpoint.MessageEndpointFactory ; 50 51 52 public class EndpointKey { 53 final private MessageEndpointFactory messageEndpointFactory; 54 final private ActivationSpecImpl activationSpec; 55 56 60 public EndpointKey(MessageEndpointFactory messageEndpointFactory, ActivationSpecImpl activationSpec) { 61 this.messageEndpointFactory = messageEndpointFactory; 62 this.activationSpec = activationSpec; 63 } 64 65 68 public int hashCode() { 69 return messageEndpointFactory.hashCode() ^ activationSpec.hashCode(); 70 } 71 72 75 public ActivationSpecImpl getActivationSpec() { 76 return activationSpec; 77 } 78 79 82 public MessageEndpointFactory getMessageEndpointFactory() { 83 return messageEndpointFactory; 84 } 85 86 89 public boolean equals(Object obj) { 90 if (this == obj) { 91 return true; 92 } 93 if (obj == null) { 94 return false; 95 } 96 97 if (!(obj instanceof EndpointKey)) { 98 return false; 99 } 100 101 EndpointKey o = (EndpointKey) obj; 102 103 return o.activationSpec == activationSpec && o.messageEndpointFactory == messageEndpointFactory; 107 } 108 } | Popular Tags |