Modifier and Type | Field and Description |
---|---|
static JSONPage |
EMPTY_PAGE |
Constructor and Description |
---|
JSONPage(java.lang.Object jsonContent)
Initializes an instance of this class using the final content in JSON
form.
|
Modifier and Type | Method and Description |
---|---|
void |
addHeader(java.lang.String header,
java.util.Date value) |
void |
addHeader(java.lang.String header,
int value) |
void |
addHeader(java.lang.String header,
java.lang.String value) |
java.lang.Object |
getContent() |
java.lang.String |
getContentType()
Returns the content type of the page, for example "text/html".
|
java.util.List<Pair<java.lang.String,java.lang.Object>> |
getHeaders()
Returns the list of http-response-headers to be set on the
HttpServletResponse |
java.lang.String |
show()
For a JSONPage, this is usually never called by the dispatcher; the content will be written directly to the writer of the response.
|
void |
writeTo(javax.servlet.http.HttpServletResponse res)
Deprecated.
|
public static final JSONPage EMPTY_PAGE
public JSONPage(java.lang.Object jsonContent)
jsonContent
- the response content in JSON formpublic java.lang.String getContentType()
Page
getContentType
in interface Page
public java.lang.String show()
show
in interface Page
Page.show()
public java.lang.Object getContent()
@Deprecated public void writeTo(javax.servlet.http.HttpServletResponse res) throws java.io.IOException
res
- java.io.IOException
public java.util.List<Pair<java.lang.String,java.lang.Object>> getHeaders()
Page
HttpServletResponse
getHeaders
in interface Page
String
, Date
or Integer
public void addHeader(java.lang.String header, java.lang.String value)
public void addHeader(java.lang.String header, java.util.Date value)
public void addHeader(java.lang.String header, int value)
@enterprise 9.0.33982 Copyright © 2001-2023 Groiss Informatics GmbH. All Rights Reserved.