@Override public synchronized void resume() { if(!suspended) throw new RuntimeException("Cannot resume: not suspended"); if(inFilter) { // suspend/resume within filter, same thread: just ignore and move on suspended = false; return; } ResteasyContext.pushContextDataMap(contextDataMap); // go on, but with proper exception handling try { filter(); }catch(Throwable t) { // don't throw to client writeException(t); } }
public Response preprocess(HttpRequest request) { RESTEasyTracingLogger.initTracingSupport(providerFactory, request); Response aborted = null; RESTEasyTracingLogger tracingLogger = RESTEasyTracingLogger.getInstance(request); try { final long totalTimestamp = tracingLogger.timestamp("PRE_MATCH_SUMMARY"); for (HttpRequestPreprocessor preprocessor : this.requestPreprocessors) { final long timestamp = tracingLogger.timestamp("PRE_MATCH"); preprocessor.preProcess(request); tracingLogger.logDuration("PRE_MATCH", timestamp, preprocessor.getClass().toString()); } tracingLogger.logDuration("PRE_MATCH_SUMMARY", totalTimestamp, this.requestPreprocessors.size()); ContainerRequestFilter[] requestFilters = providerFactory.getContainerRequestFilterRegistry().preMatch(); // FIXME: support async PreMatchContainerRequestContext requestContext = new PreMatchContainerRequestContext(request, requestFilters, null); aborted = requestContext.filter(); } catch (Exception e) { //logger.error("Failed in preprocess, mapping exception", e); aborted = new ExceptionHandler(providerFactory, unwrappedExceptions).handleException(request, e); } return aborted; }
return null; }); aborted = requestContext.filter(); } catch (Exception e) {
@Override public synchronized void resume() { if(!suspended) throw new RuntimeException("Cannot resume: not suspended"); if(inFilter) { // suspend/resume within filter, same thread: just ignore and move on suspended = false; return; } ResteasyContext.pushContextDataMap(contextDataMap); // go on, but with proper exception handling try { filter(); }catch(Throwable t) { // don't throw to client writeException(t); } }
public Response preprocess(HttpRequest request) { RESTEasyTracingLogger.initTracingSupport(providerFactory, request); Response aborted = null; RESTEasyTracingLogger tracingLogger = RESTEasyTracingLogger.getInstance(request); try { final long totalTimestamp = tracingLogger.timestamp("PRE_MATCH_SUMMARY"); for (HttpRequestPreprocessor preprocessor : this.requestPreprocessors) { final long timestamp = tracingLogger.timestamp("PRE_MATCH"); preprocessor.preProcess(request); tracingLogger.logDuration("PRE_MATCH", timestamp, preprocessor.getClass().toString()); } tracingLogger.logDuration("PRE_MATCH_SUMMARY", totalTimestamp, this.requestPreprocessors.size()); ContainerRequestFilter[] requestFilters = providerFactory.getContainerRequestFilterRegistry().preMatch(); // FIXME: support async PreMatchContainerRequestContext requestContext = new PreMatchContainerRequestContext(request, requestFilters, null); aborted = requestContext.filter(); } catch (Exception e) { //logger.error("Failed in preprocess, mapping exception", e); aborted = new ExceptionHandler(providerFactory, unwrappedExceptions).handleException(request, e); } return aborted; }
return null; }); aborted = requestContext.filter(); } catch (Exception e) {