@Override protected void beginAsync() { ServletRequestContext.this.beginAsync(); }
@Override protected void beginAsync() { ServletRequestContext.this.beginAsync(); }
@Override public void execute(final Runnable runnable) { if (ctx.req.isAsyncSupported()) { AsyncContext context = ctx.beginAsync(); ServletRequestContext.log.trace("Scheduling runnable " + runnable); context.start(new Runnable() { public void run() { ServletRequestContext.log.trace("Starting runnable " + runnable); try { runnable.run(); ServletRequestContext.log.trace("Ended runnable " + runnable); } catch (Exception e) { if (e instanceof InterruptedException) { Thread.currentThread().interrupt(); } ServletRequestContext.log.trace("Failure of runnable " + runnable, e); } } }); } else { throw new RejectedExecutionException("Async not enabled currently for this servlet"); } }
@Override public void execute(final Runnable runnable) { if (ctx.req.isAsyncSupported()) { AsyncContext context = ctx.beginAsync(); ServletRequestContext.log.trace("Scheduling runnable " + runnable); context.start(new Runnable() { public void run() { ServletRequestContext.log.trace("Starting runnable " + runnable); try { runnable.run(); ServletRequestContext.log.trace("Ended runnable " + runnable); } catch (Exception e) { if (e instanceof InterruptedException) { Thread.currentThread().interrupt(); } ServletRequestContext.log.trace("Failure of runnable " + runnable, e); } } }); } else { throw new RejectedExecutionException("Async not enabled currently for this servlet"); } }