// object, but none was supplied.
if (asyncHandler == null) {
throw ExceptionFactory
.makeWebServiceException(Messages.getMessage("proxyNullCallback"));
}
AsyncResponse listener = createProxyListener(args, operationDesc);
requestIC.setAsyncResponseListener(listener);
if ((serviceDelegate.getExecutor() != null) &&
(serviceDelegate.getExecutor() instanceof ExecutorService)) {
ExecutorService es = (ExecutorService)serviceDelegate.getExecutor();
if (es.isShutdown()) {
// the executor service is shutdown and won't accept new tasks
// so return an error back to the client
throw ExceptionFactory
.makeWebServiceException(Messages.getMessage("ExecutorShutdown"));
}
}
requestIC.setExecutor(serviceDelegate.getExecutor());
Future<?> future = controller.invokeAsync(requestIC, asyncHandler);
//Check to see if we need to maintain session state
checkMaintainSessionState(request, requestIC);
return future;
}
if (method.getReturnType() == Response.class) {
if (log.isDebugEnabled()) {
log.debug("Async Polling");
}
AsyncResponse listener = createProxyListener(args, operationDesc);
requestIC.setAsyncResponseListener(listener);
requestIC.setExecutor(serviceDelegate.getExecutor());
Response response = controller.invokeAsync(requestIC);