-
- All Implemented Interfaces:
public final class ResponseCheck 'Request' comment. And also note that lists should be updated by engines after callback is processed, this data is like a buffer that needs to be dumped to the real response.
HTTP response context.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceResponse.MapInterface
-
Field Summary
Fields Modifier and Type Field Description private final OutputStreamoutputStreamprivate Integerstatusprivate Objectbodyprivate StringcontentTypeprivate final Map<String, List<Object>>headersValuesprivate final Response.MapInterface<String, Object>headersprivate final ResponsePortadapter
-
Constructor Summary
Constructors Constructor Description Response(ResponsePort adapter)
-
Method Summary
Modifier and Type Method Description final OutputStreamgetOutputStream()Output Stream of the response. final IntegergetStatus()final UnitsetStatus(Integer status)final ObjectgetBody()final UnitsetBody(Object body)final StringgetContentType()final UnitsetContentType(String contentType)final Map<String, List<Object>>getHeadersValues()Response headers. final Response.MapInterface<String, Object>getHeaders()A MapInterface implementation for response headers. final ResponsePortgetAdapter()final Unitredirect(String url)Sends a redirect response to the client using the specified redirect URL. final UnitaddCookie(Cookie cookie)Sends a response by adding the given cookie. final UnitremoveCookie(String name)Sends a response by removing the cookie with specified name. -
-
Constructor Detail
-
Response
Response(ResponsePort adapter)
-
-
Method Detail
-
getOutputStream
final OutputStream getOutputStream()
Output Stream of the response.
-
getContentType
final String getContentType()
-
setContentType
final Unit setContentType(String contentType)
-
getHeadersValues
final Map<String, List<Object>> getHeadersValues()
Response headers.
-
getHeaders
final Response.MapInterface<String, Object> getHeaders()
A MapInterface implementation for response headers.
-
getAdapter
final ResponsePort getAdapter()
-
redirect
final Unit redirect(String url)
Sends a redirect response to the client using the specified redirect URL.
- Parameters:
url- Redirect URL.
-
addCookie
final Unit addCookie(Cookie cookie)
Sends a response by adding the given cookie.
- Parameters:
cookie- Cookie to be added.
-
removeCookie
final Unit removeCookie(String name)
Sends a response by removing the cookie with specified name.
- Parameters:
name- Cookie to be deleted.
-
-
-
-