asyncListener.onTimeout(asyncEvent);
} else if (error) {
Throwable t = (Throwable) request.getAttribute(Globals.EXCEPTION_ATTR);
AsyncEvent asyncEvent = new AsyncEvent(asyncContext,
asyncListenerRegistration.getRequest(), asyncListenerRegistration.getResponse(), t);
asyncListener.onError(asyncEvent);
} else {
AsyncEvent asyncEvent = new AsyncEvent(asyncContext,
asyncListenerRegistration.getRequest(), asyncListenerRegistration.getResponse());
asyncListener.onComplete(asyncEvent);
}