final HttpServletResponse response, final Locale locale) throws Exception {
ExtDirectPollResponse directPollResponse = new ExtDirectPollResponse();
directPollResponse.setName(event);
MethodInfo methodInfo = MethodInfoCache.INSTANCE.get(beanName, method);
boolean streamResponse;
if (methodInfo != null) {
streamResponse = configuration.isStreamResponse() || methodInfo.isStreamResponse();
try {
List<ParameterInfo> methodParameters = methodInfo.getParameters();
Object[] parameters = null;
if (!methodParameters.isEmpty()) {
parameters = new Object[methodParameters.size()];
for (int paramIndex = 0; paramIndex < methodParameters.size(); paramIndex++) {
ParameterInfo methodParameter = methodParameters.get(paramIndex);
if (methodParameter.isSupportedParameter()) {
parameters[paramIndex] = SupportedParameters.resolveParameter(methodParameter.getType(),
request, response, locale);
} else if (methodParameter.isHasRequestHeaderAnnotation()) {
parameters[paramIndex] = handleRequestHeader(request, methodParameter);
} else {
parameters[paramIndex] = handleRequestParam(request, null, methodParameter);
}
}
}
if (configuration.isSynchronizeOnSession() || methodInfo.isSynchronizeOnSession()) {
HttpSession session = request.getSession(false);
if (session != null) {
Object mutex = WebUtils.getSessionMutex(session);
synchronized (mutex) {
directPollResponse.setData(ExtDirectSpringUtil.invoke(context, beanName, methodInfo,