public class StringResponse extends Response
Modifier and Type | Class and Description |
---|---|
static interface |
StringResponse.StringData
Interface for classes, which should support conversion to string-based response data
|
Response.Status
Constructor and Description |
---|
StringResponse()
for serialization
|
StringResponse(Response.Status status) |
StringResponse(StringResponse.StringData data) |
Modifier and Type | Method and Description |
---|---|
StringResponse.StringData |
getStringData() |
void |
setResponseData(ResponseData data) |
void |
setStringData(StringResponse.StringData stringData) |
void |
writeTo(javax.servlet.http.HttpServletResponse response)
Write this response to the given response object.
|
getMessage, getMethod, getResponseData, getService, getStatus, setDefaultAuthenticationHeader, setMessage, setMethod, setService, setStatus
public StringResponse()
public StringResponse(Response.Status status)
status
- public StringResponse(StringResponse.StringData data)
data
- public void setResponseData(ResponseData data) throws java.lang.UnsupportedOperationException
setResponseData
in class Response
data
- the data to setjava.lang.UnsupportedOperationException
- if data is not of type StringResponse.StringData
setStringData(StringData)
public void writeTo(javax.servlet.http.HttpServletResponse response)
Response
Response.Status.UNAUTHORIZED
.writeTo
in class Response
Response.setDefaultAuthenticationHeader(HttpServletResponse)
,
Response.setStatus(core.tut.pori.http.Response.Status)
public StringResponse.StringData getStringData()
public void setStringData(StringResponse.StringData stringData)
stringData
- the stringData to setCopyright © 2015 Tampere University of Technology, Pori Department.