/** * Invokes the action and returns action result value object. * Invokes all interceptors before and after action invocation. */ public Object invoke() throws Exception { if (executed == true) { throw new MadvocException("Action '" + config.actionPath + "' has already been invoked."); } // interceptors if (interceptorIndex < totalInterceptors) { ActionInterceptor interceptor = config.interceptors[interceptorIndex]; interceptorIndex++; return interceptor.invoke(this); } // action Object actionInvocationResult = invokeAction(); executed = true; return actionInvocationResult; }