/** * Report that a namespace is not found. The namespace is extracted from the * {@link HttpServletRequest}. */ protected void buildAndCommitNamespaceNotFoundResponse( final HttpServletRequest req, final HttpServletResponse resp) throws IOException { buildAndCommitResponse(resp, HttpServletResponse.SC_NOT_FOUND, MIME_TEXT_PLAIN, "Not found: namespace=" + getNamespace(req) // +", timestamp="+getTimestamp(req) ); }
/** * Report that a namespace is not found. The namespace is extracted from the * {@link HttpServletRequest}. */ protected void buildAndCommitNamespaceNotFoundResponse( final HttpServletRequest req, final HttpServletResponse resp) throws IOException { buildAndCommitResponse(resp, HttpServletResponse.SC_NOT_FOUND, MIME_TEXT_PLAIN, "Not found: namespace=" + getNamespace(req) // +", timestamp="+getTimestamp(req) ); }
buildAndCommitResponse(resp, HTTP_BADREQUEST, MIME_TEXT_PLAIN, sb.toString()); return null;
buildAndCommitResponse(resp, HTTP_BADREQUEST, MIME_TEXT_PLAIN, sb.toString()); return null;
/** * Report an access path range count and elapsed time back to the user agent. * * @param resp * The response. * @param rangeCount * The mutation count. * @param elapsed * The elapsed time (milliseconds). * * @throws IOException */ static protected void buildAndCommitRangeCountResponse( final HttpServletResponse resp, final long rangeCount, final long elapsed) throws IOException { final StringWriter w = new StringWriter(); final XMLBuilder t = new XMLBuilder(w); t.root("data").attr("rangeCount", rangeCount) .attr("milliseconds", elapsed).close(); buildAndCommitResponse(resp, HTTP_OK, MIME_APPLICATION_XML, w.toString()); }
/** * Report an access path range count and elapsed time back to the user agent. * * @param resp * The response. * @param rangeCount * The mutation count. * @param elapsed * The elapsed time (milliseconds). * * @throws IOException */ static protected void buildAndCommitRangeCountResponse( final HttpServletResponse resp, final long rangeCount, final long elapsed) throws IOException { final StringWriter w = new StringWriter(); final XMLBuilder t = new XMLBuilder(w); t.root("data").attr("rangeCount", rangeCount) .attr("milliseconds", elapsed).close(); buildAndCommitResponse(resp, HTTP_OK, MIME_APPLICATION_XML, w.toString()); }
.close(); buildAndCommitResponse(resp, HttpServletResponse.SC_OK, MIME_APPLICATION_XML, w.toString());
.close(); buildAndCommitResponse(resp, HttpServletResponse.SC_OK, MIME_APPLICATION_XML, w.toString());