/** * Gets detail error message. * * @return the detail error message */ @SuppressWarnings("unused") public String getDetailMessage() { checkResponse(); return response.getReasonPhrase(); } // END S1AS 4878272
/** * Return the content length that was set or calculated for this Response. */ public int getContentLength() { checkResponse(); return (int) response.getContentLength(); }
/** * Sets detail error message. * * @param message detail error message */ public void setDetailMessage(String message) { checkResponse(); response.setReasonPhrase(message); }
/** * Has the output of this response already been committed? */ public boolean isCommitted() { checkResponse(); return response.isCommitted(); }
/** * Return the HTTP status code associated with this Response. */ public int getStatus() { checkResponse(); return response.getStatus(); }
/** * Has the specified header been set already in this response? * * @param name Name of the header to check */ public boolean containsHeader(final String name) { checkResponse(); return response.containsHeader(name); }
/** * Return the content type that was set or calculated for this response, * or <code>null</code> if no content type was set. */ public String getContentType() { checkResponse(); return response.getContentType(); }
/** * Return the character encoding used for this Response. */ public String getCharacterEncoding() { checkResponse(); final String characterEncoding = response.getCharacterEncoding(); if (characterEncoding == null) { return DEFAULT_HTTP_CHARACTER_ENCODING; } return characterEncoding; }
/** * Return the content length that was set or calculated for this Response. */ public long getContentLengthLong() { checkResponse(); return response.getContentLength(); }
/** * Sets detail error message. * * @param message detail error message */ public void setDetailMessage(String message) { checkResponse(); response.setReasonPhrase(message); }
/** * Gets detail error message. * * @return the detail error message */ @SuppressWarnings("unused") public String getDetailMessage() { checkResponse(); return response.getReasonPhrase(); } // END S1AS 4878272
/** * Return the error message that was set with <code>sendError()</code> * for this Response. */ public String getMessage() { checkResponse(); return response.getReasonPhrase(); }
/** * Return the HTTP status code associated with this Response. */ public int getStatus() { checkResponse(); return response.getStatus(); }
/** * Return the content length that was set or calculated for this Response. */ public long getContentLengthLong() { checkResponse(); return response.getContentLength(); }
/** * Add the specified header to the specified value. * * @param name Name of the header to set * @param value Value to be set */ public void addHeader(final String name, final String value) { checkResponse(); if (isCommitted()) return; response.addHeader(name, value); }
/** * Set the specified header to the specified value. * * @param name Name of the header to set * @param value Value to be set */ public void setHeader(final String name, final String value) { checkResponse(); if (isCommitted()) return; response.setHeader(name, value); }
/** * Set the specified header to the specified value. * * @param name Name of the header to set * @param value Value to be set */ public void setHeader(final String name, final String value) { checkResponse(); if (isCommitted()) return; response.setHeader(name, value); }
/** * Set the Locale that is appropriate for this response, including * setting the appropriate character encoding. * * @param locale The new locale */ public void setLocale(final Locale locale) { checkResponse(); if (isCommitted()) return; response.setLocale(locale); }
/** * Complete the {@link Response} and finish/commit it. If a * {@link CompletionHandler} has been defined, its {@link CompletionHandler#completed(Object)} * will first be invoked, then the {@link Response#finish()}. * Those operations commit the response. */ @SuppressWarnings({"unchecked"}) public void resume() { checkResponse(); suspendedContext.markResumed(); ctx.resume(); }
/** * Add the specified header to the specified value. * * @param name Name of the header to set * @param value Value to be set */ public void addHeader(final String name, final String value) { checkResponse(); if (isCommitted()) return; response.addHeader(name, value); }