1 package com.atlassian.plugins.rest.common.interceptor;
2
3 import com.sun.jersey.api.model.AbstractResourceMethod;
4 import com.sun.jersey.api.core.HttpContext;
5
6 import java.lang.reflect.InvocationTargetException;
7
8 /**
9 * Represents context information about a resource method invocation.
10 *
11 * @since 2.0
12 */
13 public interface MethodInvocation {
14 /**
15 * @return the resource object upon which the method resides
16 */
17 Object getResource();
18
19 /**
20 * @return the http context
21 */
22 HttpContext getHttpContext();
23
24 /**
25 * @return the method to be executed
26 */
27 AbstractResourceMethod getMethod();
28
29 /**
30 * Get the objects that will passed into the method. The array is mutable.
31 *
32 * @return An array of objects
33 */
34 Object[] getParameters();
35
36 /**
37 * Called to invoke the next interceptor in the chain
38 *
39 * @throws IllegalAccessException
40 * @throws java.lang.reflect.InvocationTargetException
41 */
42 void invoke() throws IllegalAccessException, InvocationTargetException;
43 }