View Javadoc
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.api.model;
8   
9   import org.mule.api.MuleEventContext;
10  
11  /**
12   * <code>EntryPointResolver</code> resolves a method to call on the given
13   * Component when an event is received for the service.
14   *
15   * Note that one instance of an entry point will be created for a component. This means the type of the component will always be
16   * of the same type for the life of the instance. Resolvers must be thread safe since multiple requests on the same component can
17   * happen concurrently.  The recommended approach is to use atomic values and concurrent collections where needed rather than
18   * synchronizing the invoke method, which could impact performance
19   */
20  public interface EntryPointResolver
21  {
22      InvocationResult invoke(Object component, MuleEventContext context) throws Exception;
23  }