ServletResponse
WebApplicationResponse
, WebApplicationServerResponse
DefaultWebApplicationResponse
, DefaultWebApplicationServerResponse
, EmbeddedResponse
, HttpServletResponseWrapper
, NanoResponse
public interface HttpServletResponse extends ServletResponse
Modifier and Type | Field | Description |
---|---|---|
static int |
SC_ACCEPTED |
Defines the 202 status code.
|
static int |
SC_BAD_GATEWAY |
Defines the 502 status code.
|
static int |
SC_BAD_REQUEST |
Defines the 400 status code.
|
static int |
SC_CONFLICT |
Defines the 409 status code.
|
static int |
SC_CONTINUE |
Defines the 100 status code.
|
static int |
SC_CREATED |
Defines the 201 status code.
|
static int |
SC_EXPECTATION_FAILED |
Defines the 417 status code.
|
static int |
SC_FORBIDDEN |
Defines the 403 status code.
|
static int |
SC_FOUND |
Defines the 302 status code (recommended variant).
|
static int |
SC_GATEWAY_TIMEOUT |
Defines the 504 status code.
|
static int |
SC_GONE |
Defines the 410 status code.
|
static int |
SC_HTTP_VERSION_NOT_SUPPORTED |
Defines the 505 status code.
|
static int |
SC_INTERNAL_SERVER_ERROR |
Defines the 500 status code.
|
static int |
SC_LENGTH_REQUIRED |
Defines the 411 status code.
|
static int |
SC_METHOD_NOT_ALLOWED |
Defines the 405 status code.
|
static int |
SC_MOVED_PERMANENTLY |
Defines the 301 status code.
|
static int |
SC_MOVED_TEMPORARILY |
Defines the 302 status code.
|
static int |
SC_MULTIPLE_CHOICES |
Defines the 300 status code.
|
static int |
SC_NO_CONTENT |
Defines the 204 status code.
|
static int |
SC_NON_AUTHORITATIVE_INFORMATION |
Defines the 203 status code.
|
static int |
SC_NOT_ACCEPTABLE |
Defines the 406 status code.
|
static int |
SC_NOT_FOUND |
Defines the 404 status code.
|
static int |
SC_NOT_IMPLEMENTED |
Defines the 501 status code.
|
static int |
SC_NOT_MODIFIED |
Defines the 305 status code.
|
static int |
SC_OK |
Defines the 200 status code.
|
static int |
SC_PARTIAL_CONTENT |
Defines the 206 status code.
|
static int |
SC_PAYMENT_REQUIRED |
Defines the 402 status code.
|
static int |
SC_PRECONDITION_FAILED |
Defines the 412 status code.
|
static int |
SC_PROXY_AUTHENTICATION_REQUIRED |
Defines the 407 status code.
|
static int |
SC_REQUEST_ENTITY_TOO_LARGE |
Defines the 413 status code.
|
static int |
SC_REQUEST_TIMEOUT |
Defines the 408 status code.
|
static int |
SC_REQUEST_URI_TOO_LONG |
Defines the 414 status code.
|
static int |
SC_REQUESTED_RANGE_NOT_SATISFIABLE |
Defines the 416 status code.
|
static int |
SC_RESET_CONTENT |
Defines the 205 status code.
|
static int |
SC_SEE_OTHER |
Defines the 303 status code.
|
static int |
SC_SERVICE_UNAVAILABLE |
Defines the 503 status code.
|
static int |
SC_SWITCHING_PROTOCOLS |
Defines the 101 status code.
|
static int |
SC_TEMPORARY_REDIRECT |
Defines the 307 status code.
|
static int |
SC_UNAUTHORIZED |
Defines the 401 status code.
|
static int |
SC_UNSUPPORTED_MEDIA_TYPE |
Defines the 415 status code.
|
static int |
SC_USE_PROXY |
Defines the 305 status code.
|
Modifier and Type | Method | Description |
---|---|---|
void |
addCookie(Cookie cookie) |
Adds the cookie.
|
void |
addDateHeader(String name,
long date) |
Add the date header.
|
void |
addHeader(String name,
String value) |
Add the header.
|
void |
addIntHeader(String name,
int value) |
Add the inttheader.
|
boolean |
containsHeader(String name) |
Contains the header.
|
String |
encodeRedirectUrl(String url) |
Deprecated.
|
String |
encodeRedirectURL(String url) |
Encode the redirect URL.
|
String |
encodeUrl(String url) |
Deprecated.
|
String |
encodeURL(String url) |
Encode the URL.
|
String |
getHeader(String name) |
Get the header.
|
Collection<String> |
getHeaderNames() |
Get the header names.
|
Collection<String> |
getHeaders(String name) |
Get the headers.
|
int |
getStatus() |
Get the status.
|
default Supplier<Map<String,String>> |
getTrailerFields() |
Get the supplier of trailer fields.
|
void |
sendError(int status) |
Sends the error.
|
void |
sendError(int status,
String message) |
Send the error.
|
void |
sendRedirect(String location) |
Send a redirect.
|
void |
setDateHeader(String name,
long date) |
Set the date header.
|
void |
setHeader(String name,
String value) |
Set the header.
|
void |
setIntHeader(String name,
int value) |
Set the int header.
|
void |
setStatus(int status) |
Set the status.
|
void |
setStatus(int status,
String message) |
Deprecated.
|
default void |
setTrailerFields(Supplier<Map<String,String>> supplier) |
Set the trailer fields supplier.
|
flushBuffer, getBufferSize, getCharacterEncoding, getContentType, getLocale, getOutputStream, getWriter, isCommitted, reset, resetBuffer, setBufferSize, setCharacterEncoding, setContentLength, setContentLengthLong, setContentType, setLocale
static final int SC_CONTINUE
static final int SC_SWITCHING_PROTOCOLS
static final int SC_OK
static final int SC_CREATED
static final int SC_ACCEPTED
static final int SC_NON_AUTHORITATIVE_INFORMATION
static final int SC_NO_CONTENT
static final int SC_RESET_CONTENT
static final int SC_PARTIAL_CONTENT
static final int SC_MULTIPLE_CHOICES
static final int SC_MOVED_PERMANENTLY
static final int SC_MOVED_TEMPORARILY
static final int SC_FOUND
static final int SC_SEE_OTHER
static final int SC_NOT_MODIFIED
static final int SC_USE_PROXY
static final int SC_TEMPORARY_REDIRECT
static final int SC_BAD_REQUEST
static final int SC_UNAUTHORIZED
static final int SC_PAYMENT_REQUIRED
static final int SC_FORBIDDEN
static final int SC_NOT_FOUND
static final int SC_METHOD_NOT_ALLOWED
static final int SC_NOT_ACCEPTABLE
static final int SC_PROXY_AUTHENTICATION_REQUIRED
static final int SC_REQUEST_TIMEOUT
static final int SC_CONFLICT
static final int SC_GONE
static final int SC_LENGTH_REQUIRED
static final int SC_PRECONDITION_FAILED
static final int SC_REQUEST_ENTITY_TOO_LARGE
static final int SC_REQUEST_URI_TOO_LONG
static final int SC_UNSUPPORTED_MEDIA_TYPE
static final int SC_REQUESTED_RANGE_NOT_SATISFIABLE
static final int SC_EXPECTATION_FAILED
static final int SC_INTERNAL_SERVER_ERROR
static final int SC_NOT_IMPLEMENTED
static final int SC_BAD_GATEWAY
static final int SC_SERVICE_UNAVAILABLE
static final int SC_GATEWAY_TIMEOUT
static final int SC_HTTP_VERSION_NOT_SUPPORTED
void addCookie(Cookie cookie)
cookie
- the cookie.void addDateHeader(String name, long date)
name
- the name.date
- the date.void addHeader(String name, String value)
name
- the name.value
- the value.void addIntHeader(String name, int value)
name
- the name.value
- the value.boolean containsHeader(String name)
name
- the name.String encodeRedirectURL(String url)
url
- the redirect URL.@Deprecated String encodeRedirectUrl(String url)
url
- the redirect URL.String encodeURL(String url)
url
- the URL.@Deprecated String encodeUrl(String url)
url
- the URL.String getHeader(String name)
name
- the name.Collection<String> getHeaderNames()
Collection<String> getHeaders(String name)
name
- the name.int getStatus()
default Supplier<Map<String,String>> getTrailerFields()
void sendError(int status, String message) throws IOException
status
- the status code.message
- the message.IOException
- when an I/O error occurs.void sendError(int status) throws IOException
status
- the status code.IOException
- when an I/O error occurs.void sendRedirect(String location) throws IOException
location
- the location.IOException
- when an I/O error occurs.void setDateHeader(String name, long date)
name
- the name.date
- the date.void setHeader(String name, String value)
name
- the name.value
- the value.void setIntHeader(String name, int value)
name
- the name.value
- the value.void setStatus(int status)
status
- the status.@Deprecated void setStatus(int status, String message)
status
- the status.message
- the message.Copyright © 2020 Piranha Cloud. All rights reserved.