View Javadoc

1   /*
2    * $Id: UMOInterceptor.java 7963 2007-08-21 08:53:15Z dirk.olmes $
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.umo;
12  
13  /**
14   * <code>UMOInterceptor</code> is based on a similar concept of servlet filters and
15   * works much the same way. This method is more commonally known as the interceptor
16   * pattern and it allows for pre and processing of invocations on the object being
17   * intercepted.
18   */
19  public interface UMOInterceptor
20  {
21      /**
22       * Invoked by the previous interceptor in the chain
23       * 
24       * @param invocation the invocation containing info about the current message and
25       *            component
26       * @return A result message that may have been altered by this invocation
27       * @throws UMOException if the invocation fails
28       */
29      UMOMessage intercept(Invocation invocation) throws UMOException;
30  }