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