@Override public AsyncContext get() { return reference.get().asyncContext(); } }
@Override public AsyncContext get() { return reference.get().asyncContext(); } }
private BiConsumer whenComplete(RequestProcessingContext processingContext) { return (entity, exception) -> { if (exception != null) { if (exception instanceof CancellationException) { processingContext.asyncContext().resume(Response.status(Response.Status.SERVICE_UNAVAILABLE).build()); } else { processingContext.asyncContext().resume(((Throwable) exception)); } } else { processingContext.asyncContext().resume(entity); } }; }
private BiConsumer whenComplete(RequestProcessingContext processingContext) { return (entity, exception) -> { if (exception != null) { if (exception instanceof CancellationException) { processingContext.asyncContext().resume(Response.status(Response.Status.SERVICE_UNAVAILABLE).build()); } else { processingContext.asyncContext().resume(((Throwable) exception)); } } else { processingContext.asyncContext().resume(entity); } }; }
if (!processingContext.asyncContext().suspend()) { throw new ProcessingException(LocalizationMessages.ERROR_SUSPENDING_ASYNC_REQUEST()); processingContext.asyncContext().invokeManaged(() -> { final Response response = invoke(processingContext, resource); if (method.isSuspendDeclared()) { if (!processingContext.asyncContext().suspend()) { throw new ProcessingException(LocalizationMessages.ERROR_SUSPENDING_ASYNC_REQUEST());
if (!processingContext.asyncContext().suspend()) { throw new ProcessingException(LocalizationMessages.ERROR_SUSPENDING_ASYNC_REQUEST()); processingContext.asyncContext().invokeManaged(() -> { final Response response = invoke(processingContext, resource); if (method.isSuspendDeclared()) { if (!processingContext.asyncContext().suspend()) { throw new ProcessingException(LocalizationMessages.ERROR_SUSPENDING_ASYNC_REQUEST());
return reference.get().asyncContext(); };
return reference.get().asyncContext(); };
@Override public AsyncContext get() { return reference.get().asyncContext(); } }
private BiConsumer whenComplete(RequestProcessingContext processingContext) { return (entity, exception) -> { if (exception != null) { if (exception instanceof CancellationException) { processingContext.asyncContext().resume(Response.status(Response.Status.SERVICE_UNAVAILABLE).build()); } else { processingContext.asyncContext().resume(((Throwable) exception)); } } else { processingContext.asyncContext().resume(entity); } }; }
} catch (final MappableException mpe) { if (mpe.getCause() instanceof IOException) { connectionCallbackRunner.onDisconnect(processingContext.asyncContext());
} catch (final MappableException mpe) { if (mpe.getCause() instanceof IOException) { connectionCallbackRunner.onDisconnect(processingContext.asyncContext());
@Override public AsyncContext transform(RequestProcessingContext value) { return value.asyncContext(); } });
@Override public AsyncContext transform(RequestProcessingContext value) { return value.asyncContext(); } });
@Override public AsyncContext transform(RequestProcessingContext value) { return value.asyncContext(); } });
if (!processingContext.asyncContext().suspend()) { throw new ProcessingException(LocalizationMessages.ERROR_SUSPENDING_ASYNC_REQUEST()); processingContext.asyncContext().invokeManaged(() -> { final Response response = invoke(processingContext, resource); if (method.isSuspendDeclared()) { if (!processingContext.asyncContext().suspend()) { throw new ProcessingException(LocalizationMessages.ERROR_SUSPENDING_ASYNC_REQUEST());
return reference.get().asyncContext(); };
@Override public AsyncContext get() { return reference.get().asyncContext(); } }
private BiConsumer whenComplete(RequestProcessingContext processingContext) { return (entity, exception) -> { if (exception != null) { if (exception instanceof CancellationException) { processingContext.asyncContext().resume(Response.status(Response.Status.SERVICE_UNAVAILABLE).build()); } else { processingContext.asyncContext().resume(((Throwable) exception)); } } else { processingContext.asyncContext().resume(entity); } }; }
} catch (final MappableException mpe) { if (mpe.getCause() instanceof IOException) { connectionCallbackRunner.onDisconnect(processingContext.asyncContext());