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 /**
16 * @return the resource object upon which the method resides
17 */
18 Object getResource();
19
20 /**
21 * @return the http context
22 */
23 HttpContext getHttpContext();
24
25 /**
26 * @return the method to be executed
27 */
28 AbstractResourceMethod getMethod();
29
30 /**
31 * Get the objects that will passed into the method. The array is mutable.
32 *
33 * @return An array of objects
34 */
35 Object[] getParameters();
36
37 /**
38 * Called to invoke the next interceptor in the chain
39 * @throws IllegalAccessException
40 * @throws java.lang.reflect.InvocationTargetException
41 */
42 void invoke() throws IllegalAccessException, InvocationTargetException;
43 }