01: /*
02: * $Id: RequestContextInvocation.java 11130 2008-02-29 15:14:53Z 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.interceptor;
12:
13: import org.mule.api.interceptor.Invocation;
14: import org.mule.api.MuleMessage;
15: import org.mule.api.MuleEvent;
16: import org.mule.api.service.Service;
17: import org.mule.RequestContext;
18:
19: public abstract class RequestContextInvocation implements Invocation {
20:
21: public Service getService() {
22: return RequestContext.getEventContext().getService();
23: }
24:
25: public MuleEvent getEvent() {
26: return RequestContext.getEvent();
27: }
28:
29: public MuleMessage getMessage() {
30: return getEvent().getMessage();
31: }
32:
33: }
|