Coverage Report - org.mule.module.jca.MuleEndpointKey
 
Classes in this File Line Coverage Branch Coverage Complexity
MuleEndpointKey
0%
0/16
0%
0/10
2
 
 1  
 /*
 2  
  * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
 3  
  * The software in this package is published under the terms of the CPAL v1.0
 4  
  * license, a copy of which has been included with this distribution in the
 5  
  * LICENSE.txt file.
 6  
  */
 7  
 package org.mule.module.jca;
 8  
 
 9  
 import javax.resource.spi.endpoint.MessageEndpointFactory;
 10  
 
 11  
 /**
 12  
  * <code>MuleEndpointKey</code> TODO
 13  
  */
 14  
 public class MuleEndpointKey
 15  
 {
 16  
     final private MessageEndpointFactory messageEndpointFactory;
 17  
     final private MuleActivationSpec activationSpec;
 18  
 
 19  
     /**
 20  
      * @param messageEndpointFactory
 21  
      * @param activationSpec
 22  
      */
 23  
     public MuleEndpointKey(MessageEndpointFactory messageEndpointFactory, MuleActivationSpec activationSpec)
 24  0
     {
 25  0
         this.messageEndpointFactory = messageEndpointFactory;
 26  0
         this.activationSpec = activationSpec;
 27  0
     }
 28  
 
 29  
     /**
 30  
      * @return Returns the activationSpec.
 31  
      */
 32  
     public MuleActivationSpec getActivationSpec()
 33  
     {
 34  0
         return activationSpec;
 35  
     }
 36  
 
 37  
     /**
 38  
      * @return Returns the messageEndpointFactory.
 39  
      */
 40  
     public MessageEndpointFactory getMessageEndpointFactory()
 41  
     {
 42  0
         return messageEndpointFactory;
 43  
     }
 44  
 
 45  
     /**
 46  
      * @see java.lang.Object#hashCode()
 47  
      */
 48  
     public int hashCode()
 49  
     {
 50  0
         return messageEndpointFactory.hashCode() ^ activationSpec.hashCode();
 51  
     }
 52  
 
 53  
     /**
 54  
      * @see java.lang.Object#equals(java.lang.Object)
 55  
      */
 56  
     public boolean equals(Object obj)
 57  
     {
 58  0
         if (this == obj)
 59  
         {
 60  0
             return true;
 61  
         }
 62  
 
 63  0
         if (obj == null)
 64  
         {
 65  0
             return false;
 66  
         }
 67  
 
 68  0
         if (this.getClass() != obj.getClass())
 69  
         {
 70  0
             return false;
 71  
         }
 72  
 
 73  0
         MuleEndpointKey o = (MuleEndpointKey)obj;
 74  0
         return o.activationSpec == activationSpec && o.messageEndpointFactory == messageEndpointFactory;
 75  
     }
 76  
 
 77  
     public String toString()
 78  
     {
 79  0
         return "MuleEndpointKey{" + "messageEndpointFactory=" + messageEndpointFactory + ", activationSpec="
 80  
                + activationSpec + "}";
 81  
     }
 82  
 }