@ThreadRestricted(value="Call constructor") public final class Responding extends Object implements Requesting, ResponseConfiguration
Constructor and Description |
---|
Responding(WAP _wap,
HttpServletRequest _request,
HttpServletResponse _response)
Constructs a Responding.
|
Modifier and Type | Method and Description |
---|---|
void |
headMustRevalidate()
Instructs the client to validate the response for every request, such that it
never uses a stale response without first asking the user's permission.
|
void |
headNoCache()
Makes the response non-cacheable by the client.
|
Writer |
outBuf()
The writer for the response.
|
com.google.gson.stream.JsonWriter |
outJSON()
A JSON writer based on outBuf.
|
String |
outJSONIndent()
The indentation unit for the JSON writer (e.g. 3 or 4 spaces), or an empty string
"" if no indentation is required.
|
HttpServletRequest |
request()
The HTTP request from the client.
|
(package private) void |
respond()
Responds to all calls.
|
HttpServletResponse |
response()
The HTTP response to the client.
|
WAP |
wap()
The servlet handling the request.
|
boolean |
wPretty()
Whether it was requested that the response be human readable.
|
Responding(WAP _wap, HttpServletRequest _request, HttpServletResponse _response) throws HTTPRequestException
HTTPRequestException
wap()
,
request()
,
response()
@Warning(value="flush outJSON") public Writer outBuf()
public com.google.gson.stream.JsonWriter outJSON()
public String outJSONIndent()
void respond() throws IOException
IOException
public HttpServletResponse response()
public HttpServletRequest request()
Requesting
request
in interface Requesting
public WAP wap()
Requesting
wap
in interface Requesting
public boolean wPretty()
Requesting
wPretty
in interface Requesting
public void headMustRevalidate()
ResponseConfiguration
headMustRevalidate
in interface ResponseConfiguration
public void headNoCache()
ResponseConfiguration
no-cache
.
These nevertheless fail with Chrome 18. Consider adding a nonce to the client request as a fallback.
headNoCache
in interface ResponseConfiguration