public void invoke(HttpRequest request, HttpResponse response, ResourceInvoker invoker) { Response jaxrsResponse = getResponse(request, response, invoker); try { if (jaxrsResponse != null) writeJaxrsResponse(request, response, jaxrsResponse); } catch (Exception e) { handleWriteResponseException(request, response, e); } }
public void asynchronousDelivery( HttpRequest request, HttpResponse response, Response jaxrsResponse) { try { pushContextObjects(request, response); try { if (jaxrsResponse != null) writeJaxrsResponse(request, response, jaxrsResponse); } catch (Exception e) { handleWriteResponseException(request, response, e); } } finally { clearContextData(); } }
/** * Propagate NotFoundException. This is used for Filters * * @param request * @param response */ public void invokePropagateNotFound(HttpRequest request, HttpResponse response) throws NotFoundException { try { pushContextObjects(request, response); try { Response aborted = preprocess(request); if (aborted != null) { try { writeJaxrsResponse(request, response, aborted); } catch (Exception e) { handleWriteResponseException(request, response, e); return; } return; } } catch (Exception e) { handleException(request, response, e); return; } ResourceInvoker invoker = null; try { invoker = getInvoker(request); } catch (Exception failure) { if (failure instanceof NotFoundException) { throw ((NotFoundException) failure); } else { handleException(request, response, failure); return; } } try { invoke(request, response, invoker); } catch (Failure e) { handleException(request, response, e); return; } } finally { clearContextData(); } }
public void invoke(HttpRequest request, HttpResponse response) { try { pushContextObjects(request, response); Response aborted = preprocess(request); if (aborted != null) { try { writeJaxrsResponse(request, response, aborted); } catch (Exception e) { handleWriteResponseException(request, response, e); return; } return; } ResourceInvoker invoker = getInvoker(request); invoke(request, response, invoker); } catch (Failure e) { handleException(request, response, e); return; } finally { clearContextData(); } }