01: /*
02: * $Id: Invocation.java 11129 2008-02-29 15:13:29Z acooke $
03: * --------------------------------------------------------------------------------------
04: * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com
05: *
06: * The software in this package is published under the terms of the CPAL v1.0
07: * license, a copy of which has been included with this distribution in the
08: * LICENSE.txt file.
09: */
10:
11: package org.mule.api.interceptor;
12:
13: import org.mule.api.service.Service;
14: import org.mule.api.MuleMessage;
15: import org.mule.api.MuleException;
16: import org.mule.api.MuleEvent;
17:
18: /**
19: * Call the embedded component. Because interception is "lower level" in 2.x, it cannot
20: * return a MuleMessage - instead an Object is returned.
21: *
22: * <p>If you are using the adapter in the Spring Extras package then, if you want that same object to be
23: * returned as the result, you do not need to construct a new message, just return null and the
24: * adapter will manage the result correctly.
25: *
26: * @deprecated - This is only used for backwards compatability with old style (Mule 1.x) interceptors
27: */
28: public interface Invocation {
29:
30: /**
31: * Calls the component
32: *
33: * @return the result of invoking the component
34: * @throws org.mule.api.MuleException if something goes wrong
35: */
36: public Object execute() throws MuleException;
37:
38: public Service getService();
39:
40: public MuleEvent getEvent();
41:
42: public MuleMessage getMessage();
43:
44: }
|