1 /* 2 * $Id: Matchable.java 20813 2010-12-21 11:37:48Z dirk.olmes $ 3 * -------------------------------------------------------------------------------------- 4 * Copyright (c) MuleSoft, Inc. All rights reserved. http://www.mulesoft.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.api.routing; 12 13 import org.mule.api.MuleException; 14 import org.mule.api.MuleMessage; 15 16 /** 17 * Enables an artifact to be matched for routing before actually routing to it 18 */ 19 public interface Matchable 20 { 21 /** 22 * Determines if the event should be processed 23 * 24 * @param message the current message to evaluate 25 * @return true if the event should be processed by this router 26 * @throws MuleException if the event cannot be evaluated 27 */ 28 boolean isMatch(MuleMessage message) throws MuleException; 29 }