Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
Interceptor |
|
| 1.0;1 |
1 | /* | |
2 | * $Id: Interceptor.java 19191 2010-08-25 21:05:23Z tcarlson $ | |
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.interceptor; | |
12 | ||
13 | import org.mule.api.MuleEvent; | |
14 | import org.mule.api.MuleException; | |
15 | import org.mule.api.processor.InterceptingMessageProcessor; | |
16 | ||
17 | /** | |
18 | * <code>Interceptor</code> is based on a similar concept of servlet filters and | |
19 | * works much the same way. This method is more commonally known as the interceptor | |
20 | * pattern and it allows for pre and processing of invocations on the object being | |
21 | * intercepted. | |
22 | */ | |
23 | public interface Interceptor extends InterceptingMessageProcessor | |
24 | { | |
25 | ||
26 | /** | |
27 | * Invoked when the component should be called. The implementation can call | |
28 | * next.process(event) to call the component or the next filer in the chain. | |
29 | * | |
30 | * @param event the event containing info about the current message and service | |
31 | * @return A result message that may have been altered by this invocation | |
32 | * @throws org.mule.api.MuleException if the invocation fails | |
33 | */ | |
34 | MuleEvent process(MuleEvent event) throws MuleException; | |
35 | ||
36 | } |