response.sendError(HttpStatus.NOT_FOUND_404.getStatusCode()); return; if (resourcesContextPath != null && !resourcesContextPath.isEmpty()) { if (!uri.startsWith(resourcesContextPath)) { response.sendError(HttpStatus.NOT_FOUND_404.getStatusCode()); return; response.sendError(HttpStatus.NOT_FOUND_404.getStatusCode()); } else { response.setStatus(HttpStatus.OK_200);
response.sendError(503, "No workers available with this graph affinity, please retry shortly."); } catch (IOException e) {
@Override @SuppressWarnings("MagicNumber") public void failure(final Throwable error) { try { if (!grizzlyResponse.isCommitted()) { try { if (configSetStatusOverSendError) { grizzlyResponse.reset(); grizzlyResponse.setStatus(500, "Request failed."); } else { grizzlyResponse.sendError(500, "Request failed."); } } catch (final IllegalStateException ex) { // a race condition externally committing the response can still occur... logger.log(Level.FINER, "Unable to reset failed response.", ex); } catch (final IOException ex) { throw new ContainerException( LocalizationMessages.EXCEPTION_SENDING_ERROR_RESPONSE(500, "Request failed."), ex); } } } finally { logger.debugLog("{0} - failure(...) called", name); rethrow(error); } }
@Override public void service(Request request, Response response) throws IOException { response.sendError(404); } };
@Override public void service(Request request, Response response) throws IOException { response.sendError(404); } };
@Override public void service(Request request, Response response) throws IOException { response.sendError(404); } };
@Override public void service(Request request, Response response) throws IOException { response.sendError(404); } };
@Override public void service(Request request, Response response) throws IOException { response.sendError(404); } };
@Override public void service(Request request, Response response) throws IOException { response.sendError(404); } };
@Override public void service(Request request, Response response) throws IOException { response.sendError(404); } };
/** * {@inheritDoc} */ @Override public void sendError(int sc) throws IOException { if (isCommitted()) throw new IllegalStateException("Illegal attempt to call sendError() after the response has already been committed."); // response.setAppCommitted(true); response.sendError(sc); }
/** * {@inheritDoc} */ @Override public void sendError(int sc) throws IOException { if (isCommitted()) throw new IllegalStateException("Illegal attempt to call sendError() after the response has already been committed."); // response.setAppCommitted(true); response.sendError(sc); }
/** * {@inheritDoc} */ @Override public void sendError(int sc, String msg) throws IOException { if (isCommitted()) throw new IllegalStateException("Illegal attempt to call sendError() after the response has been committed."); // response.setAppCommitted(true); response.sendError(sc, msg); }
/** * {@inheritDoc} */ @Override public void sendError(int sc, String msg) throws IOException { if (isCommitted()) throw new IllegalStateException("Illegal attempt to call sendError() after the response has been committed."); // response.setAppCommitted(true); response.sendError(sc, msg); }
/** * {@inheritDoc} */ @Override public void sendError(int sc, String msg) throws IOException { if (isCommitted()) throw new IllegalStateException("Illegal attempt to call sendError() after the response has been committed."); // response.setAppCommitted(true); response.sendError(sc, msg); }
/** * {@inheritDoc} */ @Override public void sendError(int sc) throws IOException { if (isCommitted()) throw new IllegalStateException("Illegal attempt to call sendError() after the response has already been committed."); // response.setAppCommitted(true); response.sendError(sc); }
/** * {@inheritDoc} */ @Override public void sendError(int sc) throws IOException { if (isCommitted()) throw new IllegalStateException("Illegal attempt to call sendError() after the response has already been committed."); // response.setAppCommitted(true); response.sendError(sc); }
/** * {@inheritDoc} */ @Override public void sendError(int sc) throws IOException { if (isCommitted()) throw new IllegalStateException("Illegal attempt to call sendError() after the response has already been committed."); // response.setAppCommitted(true); response.sendError(sc); }
/** * {@inheritDoc} */ @Override public void sendError(int sc, String msg) throws IOException { if (isCommitted()) throw new IllegalStateException("Illegal attempt to call sendError() after the response has been committed."); // response.setAppCommitted(true); response.sendError(sc, msg); }
/** * {@inheritDoc} */ @Override public void sendError(int sc) throws IOException { if (isCommitted()) throw new IllegalStateException("Illegal attempt to call sendError() after the response has already been committed."); // response.setAppCommitted(true); response.sendError(sc); }