public class DefaultHttpResult extends java.lang.Object implements HttpResult
Constructor and Description |
---|
DefaultHttpResult(javax.servlet.http.HttpServletResponse response,
Status status) |
Modifier and Type | Method and Description |
---|---|
HttpResult |
addDateHeader(java.lang.String name,
long date) |
HttpResult |
addHeader(java.lang.String name,
java.lang.String value) |
HttpResult |
addIntHeader(java.lang.String name,
int value) |
HttpResult |
body(java.io.InputStream body) |
HttpResult |
body(java.io.Reader body) |
HttpResult |
body(java.lang.String body) |
<T> T |
movedPermanentlyTo(java.lang.Class<T> controller) |
void |
movedPermanentlyTo(java.lang.String uri) |
void |
sendError(int statusCode) |
void |
sendError(int statusCode,
java.lang.String message) |
void |
setStatusCode(int statusCode) |
public DefaultHttpResult(javax.servlet.http.HttpServletResponse response, Status status)
public HttpResult addDateHeader(java.lang.String name, long date)
addDateHeader
in interface HttpResult
public HttpResult addHeader(java.lang.String name, java.lang.String value)
addHeader
in interface HttpResult
public HttpResult addIntHeader(java.lang.String name, int value)
addIntHeader
in interface HttpResult
public void sendError(int statusCode)
sendError
in interface HttpResult
public void sendError(int statusCode, java.lang.String message)
sendError
in interface HttpResult
public void setStatusCode(int statusCode)
setStatusCode
in interface HttpResult
public void movedPermanentlyTo(java.lang.String uri)
movedPermanentlyTo
in interface HttpResult
public <T> T movedPermanentlyTo(java.lang.Class<T> controller)
movedPermanentlyTo
in interface HttpResult
public HttpResult body(java.lang.String body)
body
in interface HttpResult
public HttpResult body(java.io.InputStream body)
body
in interface HttpResult
public HttpResult body(java.io.Reader body)
body
in interface HttpResult
Copyright © 2013 Caelum. All Rights Reserved.