@Override
 public void onError(AsyncEvent event) throws IOException {
   ServletResponse resp = event.getAsyncContext().getResponse();
   resp.getWriter().write("onError-");
   resp.flushBuffer();
   if (completeOnError) {
     event.getAsyncContext().complete();
   }
 }
 @Override
 public void onTimeout(AsyncEvent event) throws IOException {
   ServletResponse resp = event.getAsyncContext().getResponse();
   resp.getWriter().write("onTimeout-");
   resp.flushBuffer();
   if (completeOnTimeout) {
     if (dispatchUrl == null) {
       event.getAsyncContext().complete();
     } else {
       event.getAsyncContext().dispatch(dispatchUrl);
     }
   }
 }
Exemplo n.º 3
0
 @Override
 public void onError(AsyncEvent event) throws IOException {
   HttpServletResponse response = (HttpServletResponse) event.getSuppliedResponse();
   response.setStatus(HttpStatus.INTERNAL_SERVER_ERROR_500);
   event.getAsyncContext().complete();
   latch.countDown();
 }
Exemplo n.º 4
0
 @Override
 public void onTimeout(AsyncEvent event) throws IOException {
   // Remove before it's redispatched, so it won't be
   // redispatched again at the end of the filtering.
   AsyncContext asyncContext = event.getAsyncContext();
   _queues[priority].remove(asyncContext);
   asyncContext.dispatch();
 }
 @Override
 public void onComplete(AsyncEvent event) throws IOException {
   if (clients.remove(event.getAsyncContext()) && clientcount.decrementAndGet() == 0) {
     ticker.removeTickListener(this);
   }
 }
 @Override
 public void onTimeout(AsyncEvent event) throws IOException {
   event.getAsyncContext().complete();
 }
 @Override
 public void onStartAsync(AsyncEvent event) throws IOException {
   ServletResponse resp = event.getAsyncContext().getResponse();
   resp.getWriter().write("onStartAsync-");
   resp.flushBuffer();
 }
Exemplo n.º 8
0
 @Override
 public void onTimeout(AsyncEvent event) throws IOException {
   _queues[priority].remove(event.getAsyncContext());
   super.onTimeout(event);
 }
Exemplo n.º 9
0
 @Override
 public void onTimeout(AsyncEvent event) throws IOException {
   event.getAsyncContext().dispatch();
 }
Exemplo n.º 10
0
 @Override
 public void onStartAsync(AsyncEvent event) throws IOException {
   event.getAsyncContext().addListener(this);
 }