private void complete(Channel ctx, boolean isKeepAlive, MediaType contentType, Req req, Object result) { U.must(result != null, "The post-processed result cannot be null!"); U.must(!(result instanceof Req), "The post-processed result cannot be a Req instance!"); U.must(!(result instanceof Resp), "The post-processed result cannot be a Resp instance!"); if (result instanceof Throwable) { handleError(req, (Throwable) result); return; } if (result == HttpStatus.ERROR) { complete(ctx, isKeepAlive, contentType, req, U.rte("Handler error!")); return; } if (result == HttpStatus.NOT_FOUND) { http.notFound(ctx, isKeepAlive, contentType, handler, req); return; } if (result == HttpStatus.ASYNC) { return; } processNormalResult(req, result); }
http.notFound(ctx, isKeepAlive, ctype, handler, req); return HttpStatus.NOT_FOUND;
private void complete(Channel ctx, boolean isKeepAlive, MediaType contentType, Req req, Object result) { U.must(result != null, "The post-processed result cannot be null!"); U.must(!(result instanceof Req), "The post-processed result cannot be a Req instance!"); U.must(!(result instanceof Resp), "The post-processed result cannot be a Resp instance!"); if (result instanceof Throwable) { handleError(req, (Throwable) result); return; } if (result == HttpStatus.ERROR) { complete(ctx, isKeepAlive, contentType, req, U.rte("Handler error!")); return; } if (result == HttpStatus.NOT_FOUND) { http.notFound(ctx, isKeepAlive, contentType, handler, req); return; } if (result == HttpStatus.ASYNC) { return; } processNormalResult(req, result); }
http.notFound(ctx, isKeepAlive, ctype, handler, req); return HttpStatus.NOT_FOUND;