Coverage Report - org.mule.transport.jms.filters.JmsSelectorFilter
 
Classes in this File Line Coverage Branch Coverage Complexity
JmsSelectorFilter
0%
0/11
0%
0/6
0
 
 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.transport.jms.filters;
 8  
 
 9  
 import static org.mule.util.ClassUtils.equal;
 10  
 import static org.mule.util.ClassUtils.hash;
 11  
 
 12  
 import org.mule.api.MuleMessage;
 13  
 import org.mule.api.routing.filter.Filter;
 14  
 
 15  
 /**
 16  
  * <code>JmsSelectorFilter</code> is a wrapper for a JMS Selector. This filter
 17  
  * should not be called. Instead the JmsConnector sets the selector on the
 18  
  * destination to the expression set on this filer.
 19  
  */
 20  0
 public class JmsSelectorFilter implements Filter
 21  
 {
 22  
 
 23  0
     private String expression = null;
 24  
 
 25  
     public boolean accept(MuleMessage message)
 26  
     {
 27  
         // If we have received the message the selector has been honoured
 28  0
         return true;
 29  
     }
 30  
 
 31  
     public String getExpression()
 32  
     {
 33  0
         return expression;
 34  
     }
 35  
 
 36  
     public void setExpression(String expression)
 37  
     {
 38  0
         this.expression = expression;
 39  0
     }
 40  
 
 41  
     public boolean equals(Object obj)
 42  
     {
 43  0
         if (this == obj) return true;
 44  0
         if (obj == null || getClass() != obj.getClass()) return false;
 45  
 
 46  0
         final JmsSelectorFilter other = (JmsSelectorFilter) obj;
 47  0
         return equal(expression, other.expression);
 48  
     }
 49  
 
 50  
     public int hashCode()
 51  
     {
 52  0
         return hash(new Object[]{this.getClass(), expression});
 53  
     }
 54  
 }