View Javadoc

1   /*
2    * $Id: EntryPointResolverSet.java 10529 2008-01-25 05:58:36Z 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.api.model;
12  
13  import org.mule.api.MuleEventContext;
14  
15  /**
16   * <code>EntryPointResolver</code> resolves a method to call on the given
17   * service object when an event is received.
18   * This object maintains a set of Resolvers that will be used in order to resolve
19   * an entrypoint on a service object until one is found or until the set is
20   * exhausted.
21   */
22  public interface EntryPointResolverSet
23  {
24  
25      Object invoke(Object component, MuleEventContext context) throws Exception;
26  
27      /**
28       * Will add a resolver to the list of resolvers to invoke on a compoent.
29       * Implementations must maintain an ordered list of resolvers
30       *
31       * @param resolver the resolver to add
32       */
33      void addEntryPointResolver(EntryPointResolver resolver);
34  
35      /**
36       * Removes a resolver from the list
37       *
38       * @param resolver the resolver to remove
39       * @return true if the resolver was found and removed from the list
40       */
41      boolean removeEntryPointResolver(EntryPointResolver resolver);
42  
43  }