public class Results
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Results.AsyncResult
An asynchronous result.
|
static class |
Results.ByteChunks
Chunked result based on byte[] chunks.
|
static class |
Results.Chunks<A>
A Chunked result.
|
static class |
Results.Redirect
A redirect result.
|
static class |
Results.Status
A simple result.
|
static class |
Results.StringChunks
Chunked result based on String chunks.
|
static class |
Results.Todo
A 501 NOT_IMPLEMENTED simple result.
|
Modifier and Type | Field and Description |
---|---|
static Result |
TODO
Generates a 501 NOT_IMPLEMENTED simple result.
|
Constructor and Description |
---|
Results() |
Modifier and Type | Method and Description |
---|---|
static Results.AsyncResult |
async(F.Promise<Result> p)
Handles an Asynchronous result.
|
static Results.Status |
badRequest()
Generates a 400 BAD_REQUEST simple result.
|
static Results.Status |
badRequest(byte[] content)
Generates a 400 BAD_REQUEST simple result.
|
static Results.Status |
badRequest(Content content)
Generates a 400 BAD_REQUEST simple result.
|
static Results.Status |
badRequest(Content content,
java.lang.String charset)
Generates a 400 BAD_REQUEST simple result.
|
static Results.Status |
badRequest(java.io.File content)
Generates a 400 BAD_REQUEST chunked result.
|
static Results.Status |
badRequest(java.io.File content,
int chunkSize)
Generates a 400 BAD_REQUEST simple result.
|
static Results.Status |
badRequest(java.io.InputStream content)
Generates a 400 BAD_REQUEST chunked result.
|
static Results.Status |
badRequest(java.io.InputStream content,
int chunkSize)
Generates a 400 BAD_REQUEST chunked result.
|
static Results.Status |
badRequest(org.codehaus.jackson.JsonNode content)
Generates a 400 BAD_REQUEST simple result.
|
static Results.Status |
badRequest(org.codehaus.jackson.JsonNode content,
java.lang.String charset)
Generates a 400 BAD_REQUEST simple result.
|
static Results.Status |
badRequest(Results.Chunks<?> chunks)
Generates a 400 BAD_REQUEST chunked result.
|
static Results.Status |
badRequest(java.lang.String content)
Generates a 400 BAD_REQUEST simple result.
|
static Results.Status |
badRequest(java.lang.String content,
java.lang.String charset)
Generates a 400 BAD_REQUEST simple result.
|
static Results.Status |
created()
Generates a 201 CREATED simple result.
|
static Results.Status |
created(byte[] content)
Generates a 201 CREATED simple result.
|
static Results.Status |
created(Content content)
Generates a 201 CREATED simple result.
|
static Results.Status |
created(Content content,
java.lang.String charset)
Generates a 201 CREATED simple result.
|
static Results.Status |
created(java.io.File content)
Generates a 201 CREATED chunked result.
|
static Results.Status |
created(java.io.File content,
int chunkSize)
Generates a 201 CREATED simple result.
|
static Results.Status |
created(java.io.InputStream content)
Generates a 201 CREATED chunked result.
|
static Results.Status |
created(java.io.InputStream content,
int chunkSize)
Generates a 201 CREATED chunked result.
|
static Results.Status |
created(org.codehaus.jackson.JsonNode content)
Generates a 201 CREATED simple result.
|
static Results.Status |
created(org.codehaus.jackson.JsonNode content,
java.lang.String charset)
Generates a 201 CREATED simple result.
|
static Results.Status |
created(Results.Chunks<?> chunks)
Generates a 201 CREATED chunked result.
|
static Results.Status |
created(java.lang.String content)
Generates a 201 CREATED simple result.
|
static Results.Status |
created(java.lang.String content,
java.lang.String charset)
Generates a 201 CREATED simple result.
|
static Results.Status |
forbidden()
Generates a 403 FORBIDDEN simple result.
|
static Results.Status |
forbidden(byte[] content)
Generates a 403 FORBIDDEN simple result.
|
static Results.Status |
forbidden(Content content)
Generates a 403 FORBIDDEN simple result.
|
static Results.Status |
forbidden(Content content,
java.lang.String charset)
Generates a 403 FORBIDDEN simple result.
|
static Results.Status |
forbidden(java.io.File content)
Generates a 403 FORBIDDEN chunked result.
|
static Results.Status |
forbidden(java.io.File content,
int chunkSize)
Generates a 403 FORBIDDEN simple result.
|
static Results.Status |
forbidden(java.io.InputStream content)
Generates a 403 FORBIDDEN chunked result.
|
static Results.Status |
forbidden(java.io.InputStream content,
int chunkSize)
Generates a 403 FORBIDDEN chunked result.
|
static Results.Status |
forbidden(org.codehaus.jackson.JsonNode content)
Generates a 403 FORBIDDEN simple result.
|
static Results.Status |
forbidden(org.codehaus.jackson.JsonNode content,
java.lang.String charset)
Generates a 403 FORBIDDEN simple result.
|
static Results.Status |
forbidden(Results.Chunks<?> chunks)
Generates a 403 FORBIDDEN chunked result.
|
static Results.Status |
forbidden(java.lang.String content)
Generates a 403 FORBIDDEN simple result.
|
static Results.Status |
forbidden(java.lang.String content,
java.lang.String charset)
Generates a 403 FORBIDDEN simple result.
|
static Result |
found(Call call)
Generates a 302 FOUND simple result.
|
static Result |
found(java.lang.String url)
Generates a 302 FOUND simple result.
|
static Results.Status |
internalServerError()
Generates a 500 INTERNAL_SERVER_ERROR simple result.
|
static Results.Status |
internalServerError(byte[] content)
Generates a 500 INTERNAL_SERVER_ERROR simple result.
|
static Results.Status |
internalServerError(Content content)
Generates a 500 INTERNAL_SERVER_ERROR simple result.
|
static Results.Status |
internalServerError(Content content,
java.lang.String charset)
Generates a 500 INTERNAL_SERVER_ERROR simple result.
|
static Results.Status |
internalServerError(java.io.File content)
Generates a 500 INTERNAL_SERVER_ERROR chunked result.
|
static Results.Status |
internalServerError(java.io.File content,
int chunkSize)
Generates a 500 INTERNAL_SERVER_ERROR simple result.
|
static Results.Status |
internalServerError(java.io.InputStream content)
Generates a 500 INTERNAL_SERVER_ERROR chunked result.
|
static Results.Status |
internalServerError(java.io.InputStream content,
int chunkSize)
Generates a 500 INTERNAL_SERVER_ERROR chunked result.
|
static Results.Status |
internalServerError(org.codehaus.jackson.JsonNode content)
Generates a 500 INTERNAL_SERVER_ERROR simple result.
|
static Results.Status |
internalServerError(org.codehaus.jackson.JsonNode content,
java.lang.String charset)
Generates a 500 INTERNAL_SERVER_ERROR simple result.
|
static Results.Status |
internalServerError(Results.Chunks<?> chunks)
Generates a 500 INTERNAL_SERVER_ERROR chunked result.
|
static Results.Status |
internalServerError(java.lang.String content)
Generates a 500 INTERNAL_SERVER_ERROR simple result.
|
static Results.Status |
internalServerError(java.lang.String content,
java.lang.String charset)
Generates a 500 INTERNAL_SERVER_ERROR simple result.
|
static Result |
movedPermanently(Call call)
Generates a 301 MOVED_PERMANENTLY simple result.
|
static Result |
movedPermanently(java.lang.String url)
Generates a 301 MOVED_PERMANENTLY simple result.
|
static Results.Status |
noContent()
Generates a 204 NO_CONTENT simple result.
|
static Results.Status |
notFound()
Generates a 404 NOT_FOUND simple result.
|
static Results.Status |
notFound(byte[] content)
Generates a 404 NOT_FOUND simple result.
|
static Results.Status |
notFound(Content content)
Generates a 404 NOT_FOUND simple result.
|
static Results.Status |
notFound(Content content,
java.lang.String charset)
Generates a 404 NOT_FOUND simple result.
|
static Results.Status |
notFound(java.io.File content)
Generates a 404 NOT_FOUND chunked result.
|
static Results.Status |
notFound(java.io.File content,
int chunkSize)
Generates a 404 NOT_FOUND simple result.
|
static Results.Status |
notFound(java.io.InputStream content)
Generates a 404 NOT_FOUND chunked result.
|
static Results.Status |
notFound(java.io.InputStream content,
int chunkSize)
Generates a 404 NOT_FOUND chunked result.
|
static Results.Status |
notFound(org.codehaus.jackson.JsonNode content)
Generates a 404 NOT_FOUND simple result.
|
static Results.Status |
notFound(org.codehaus.jackson.JsonNode content,
java.lang.String charset)
Generates a 404 NOT_FOUND simple result.
|
static Results.Status |
notFound(Results.Chunks<?> chunks)
Generates a 404 NOT_FOUND chunked result.
|
static Results.Status |
notFound(java.lang.String content)
Generates a 404 NOT_FOUND simple result.
|
static Results.Status |
notFound(java.lang.String content,
java.lang.String charset)
Generates a 404 NOT_FOUND simple result.
|
static Results.Status |
ok()
Generates a 200 OK simple result.
|
static Results.Status |
ok(byte[] content)
Generates a 200 OK simple result.
|
static Results.Status |
ok(Content content)
Generates a 200 OK simple result.
|
static Results.Status |
ok(Content content,
java.lang.String charset)
Generates a 200 OK simple result.
|
static Results.Status |
ok(java.io.File content)
Generates a 200 OK chunked result.
|
static Results.Status |
ok(java.io.File content,
int chunkSize)
Generates a 200 OK simple result.
|
static Results.Status |
ok(java.io.InputStream content)
Generates a 200 OK chunked result.
|
static Results.Status |
ok(java.io.InputStream content,
int chunkSize)
Generates a 200 OK chunked result.
|
static Results.Status |
ok(org.codehaus.jackson.JsonNode content)
Generates a 200 OK simple result.
|
static Results.Status |
ok(org.codehaus.jackson.JsonNode content,
java.lang.String charset)
Generates a 200 OK simple result.
|
static Results.Status |
ok(Results.Chunks<?> chunks)
Generates a 200 OK chunked result.
|
static Results.Status |
ok(java.lang.String content)
Generates a 200 OK simple result.
|
static Results.Status |
ok(java.lang.String content,
java.lang.String charset)
Generates a 200 OK simple result.
|
static Result |
redirect(Call call)
Generates a 303 SEE_OTHER simple result.
|
static Result |
redirect(java.lang.String url)
Generates a 303 SEE_OTHER simple result.
|
static Result |
seeOther(Call call)
Generates a 303 SEE_OTHER simple result.
|
static Result |
seeOther(java.lang.String url)
Generates a 303 SEE_OTHER simple result.
|
static Results.Status |
status(int status)
Generates a simple result.
|
static Results.Status |
status(int status,
byte[] content)
Generates a simple result.
|
static Results.Status |
status(int status,
Content content)
Generates a simple result.
|
static Results.Status |
status(int status,
Content content,
java.lang.String charset)
Generates a simple result.
|
static Results.Status |
status(int status,
java.io.File content)
Generates a chunked result.
|
static Results.Status |
status(int status,
java.io.File content,
int chunkSize)
Generates a simple result.
|
static Results.Status |
status(int status,
java.io.InputStream content)
Generates a chunked result.
|
static Results.Status |
status(int status,
java.io.InputStream content,
int chunkSize)
Generates a chunked result.
|
static Results.Status |
status(int status,
org.codehaus.jackson.JsonNode content)
Generates a simple result.
|
static Results.Status |
status(int status,
org.codehaus.jackson.JsonNode content,
java.lang.String charset)
Generates a simple result.
|
static Results.Status |
status(int status,
Results.Chunks<?> chunks)
Generates a chunked result.
|
static Results.Status |
status(int status,
java.lang.String content)
Generates a simple result.
|
static Results.Status |
status(int status,
java.lang.String content,
java.lang.String charset)
Generates a simple result.
|
static Result |
temporaryRedirect(Call call)
Generates a 307 TEMPORARY_REDIRECT simple result.
|
static Result |
temporaryRedirect(java.lang.String url)
Generates a 307 TEMPORARY_REDIRECT simple result.
|
static Results.Status |
unauthorized()
Generates a 401 UNAUTHORIZED simple result.
|
static Results.Status |
unauthorized(byte[] content)
Generates a 401 UNAUTHORIZED simple result.
|
static Results.Status |
unauthorized(Content content)
Generates a 401 UNAUTHORIZED simple result.
|
static Results.Status |
unauthorized(Content content,
java.lang.String charset)
Generates a 401 UNAUTHORIZED simple result.
|
static Results.Status |
unauthorized(java.io.File content)
Generates a 401 UNAUTHORIZED chunked result.
|
static Results.Status |
unauthorized(java.io.File content,
int chunkSize)
Generates a 401 UNAUTHORIZED simple result.
|
static Results.Status |
unauthorized(java.io.InputStream content)
Generates a 401 UNAUTHORIZED chunked result.
|
static Results.Status |
unauthorized(java.io.InputStream content,
int chunkSize)
Generates a 401 UNAUTHORIZED chunked result.
|
static Results.Status |
unauthorized(org.codehaus.jackson.JsonNode content)
Generates a 401 UNAUTHORIZED simple result.
|
static Results.Status |
unauthorized(org.codehaus.jackson.JsonNode content,
java.lang.String charset)
Generates a 401 UNAUTHORIZED simple result.
|
static Results.Status |
unauthorized(Results.Chunks<?> chunks)
Generates a 401 UNAUTHORIZED chunked result.
|
static Results.Status |
unauthorized(java.lang.String content)
Generates a 401 UNAUTHORIZED simple result.
|
static Results.Status |
unauthorized(java.lang.String content,
java.lang.String charset)
Generates a 401 UNAUTHORIZED simple result.
|
public static Result TODO
public static Results.AsyncResult async(F.Promise<Result> p)
public static Results.Status status(int status)
public static Results.Status status(int status, Content content)
public static Results.Status status(int status, Content content, java.lang.String charset)
public static Results.Status status(int status, java.lang.String content)
public static Results.Status status(int status, java.lang.String content, java.lang.String charset)
public static Results.Status status(int status, org.codehaus.jackson.JsonNode content)
public static Results.Status status(int status, org.codehaus.jackson.JsonNode content, java.lang.String charset)
public static Results.Status status(int status, byte[] content)
public static Results.Status status(int status, java.io.InputStream content)
public static Results.Status status(int status, java.io.InputStream content, int chunkSize)
public static Results.Status status(int status, java.io.File content)
public static Results.Status status(int status, java.io.File content, int chunkSize)
public static Results.Status status(int status, Results.Chunks<?> chunks)
public static Results.Status ok()
public static Results.Status ok(Content content)
public static Results.Status ok(Content content, java.lang.String charset)
public static Results.Status ok(java.lang.String content)
public static Results.Status ok(java.lang.String content, java.lang.String charset)
public static Results.Status ok(org.codehaus.jackson.JsonNode content)
public static Results.Status ok(org.codehaus.jackson.JsonNode content, java.lang.String charset)
public static Results.Status ok(byte[] content)
public static Results.Status ok(java.io.InputStream content)
public static Results.Status ok(java.io.InputStream content, int chunkSize)
public static Results.Status ok(java.io.File content)
public static Results.Status ok(java.io.File content, int chunkSize)
public static Results.Status ok(Results.Chunks<?> chunks)
public static Results.Status created()
public static Results.Status created(Content content)
public static Results.Status created(Content content, java.lang.String charset)
public static Results.Status created(java.lang.String content)
public static Results.Status created(java.lang.String content, java.lang.String charset)
public static Results.Status created(org.codehaus.jackson.JsonNode content)
public static Results.Status created(org.codehaus.jackson.JsonNode content, java.lang.String charset)
public static Results.Status created(byte[] content)
public static Results.Status created(java.io.InputStream content)
public static Results.Status created(java.io.InputStream content, int chunkSize)
public static Results.Status created(java.io.File content)
public static Results.Status created(java.io.File content, int chunkSize)
public static Results.Status created(Results.Chunks<?> chunks)
public static Results.Status noContent()
public static Results.Status internalServerError()
public static Results.Status internalServerError(Content content)
public static Results.Status internalServerError(Content content, java.lang.String charset)
public static Results.Status internalServerError(java.lang.String content)
public static Results.Status internalServerError(java.lang.String content, java.lang.String charset)
public static Results.Status internalServerError(org.codehaus.jackson.JsonNode content)
public static Results.Status internalServerError(org.codehaus.jackson.JsonNode content, java.lang.String charset)
public static Results.Status internalServerError(byte[] content)
public static Results.Status internalServerError(java.io.InputStream content)
public static Results.Status internalServerError(java.io.InputStream content, int chunkSize)
public static Results.Status internalServerError(java.io.File content)
public static Results.Status internalServerError(java.io.File content, int chunkSize)
public static Results.Status internalServerError(Results.Chunks<?> chunks)
public static Results.Status notFound()
public static Results.Status notFound(Content content)
public static Results.Status notFound(Content content, java.lang.String charset)
public static Results.Status notFound(java.lang.String content)
public static Results.Status notFound(java.lang.String content, java.lang.String charset)
public static Results.Status notFound(org.codehaus.jackson.JsonNode content)
public static Results.Status notFound(org.codehaus.jackson.JsonNode content, java.lang.String charset)
public static Results.Status notFound(byte[] content)
public static Results.Status notFound(java.io.InputStream content)
public static Results.Status notFound(java.io.InputStream content, int chunkSize)
public static Results.Status notFound(java.io.File content)
public static Results.Status notFound(java.io.File content, int chunkSize)
public static Results.Status notFound(Results.Chunks<?> chunks)
public static Results.Status forbidden()
public static Results.Status forbidden(Content content)
public static Results.Status forbidden(Content content, java.lang.String charset)
public static Results.Status forbidden(java.lang.String content)
public static Results.Status forbidden(java.lang.String content, java.lang.String charset)
public static Results.Status forbidden(org.codehaus.jackson.JsonNode content)
public static Results.Status forbidden(org.codehaus.jackson.JsonNode content, java.lang.String charset)
public static Results.Status forbidden(byte[] content)
public static Results.Status forbidden(java.io.InputStream content)
public static Results.Status forbidden(java.io.InputStream content, int chunkSize)
public static Results.Status forbidden(java.io.File content)
public static Results.Status forbidden(java.io.File content, int chunkSize)
public static Results.Status forbidden(Results.Chunks<?> chunks)
public static Results.Status unauthorized()
public static Results.Status unauthorized(Content content)
public static Results.Status unauthorized(Content content, java.lang.String charset)
public static Results.Status unauthorized(java.lang.String content)
public static Results.Status unauthorized(java.lang.String content, java.lang.String charset)
public static Results.Status unauthorized(org.codehaus.jackson.JsonNode content)
public static Results.Status unauthorized(org.codehaus.jackson.JsonNode content, java.lang.String charset)
public static Results.Status unauthorized(byte[] content)
public static Results.Status unauthorized(java.io.InputStream content)
public static Results.Status unauthorized(java.io.InputStream content, int chunkSize)
public static Results.Status unauthorized(java.io.File content)
public static Results.Status unauthorized(java.io.File content, int chunkSize)
public static Results.Status unauthorized(Results.Chunks<?> chunks)
public static Results.Status badRequest()
public static Results.Status badRequest(Content content)
public static Results.Status badRequest(Content content, java.lang.String charset)
public static Results.Status badRequest(java.lang.String content)
public static Results.Status badRequest(java.lang.String content, java.lang.String charset)
public static Results.Status badRequest(org.codehaus.jackson.JsonNode content)
public static Results.Status badRequest(org.codehaus.jackson.JsonNode content, java.lang.String charset)
public static Results.Status badRequest(byte[] content)
public static Results.Status badRequest(java.io.InputStream content)
public static Results.Status badRequest(java.io.InputStream content, int chunkSize)
public static Results.Status badRequest(java.io.File content)
public static Results.Status badRequest(java.io.File content, int chunkSize)
public static Results.Status badRequest(Results.Chunks<?> chunks)
public static Result redirect(java.lang.String url)
url
- The url to redirect.public static Result redirect(Call call)
call
- Call defining the url to redirect (typically comes from reverse router).public static Result found(java.lang.String url)
url
- The url to redirect.public static Result found(Call call)
call
- Call defining the url to redirect (typically comes from reverse router).public static Result movedPermanently(java.lang.String url)
url
- The url to redirect.public static Result movedPermanently(Call call)
call
- Call defining the url to redirect (typically comes from reverse router).public static Result seeOther(java.lang.String url)
url
- The url to redirect.public static Result seeOther(Call call)
call
- Call defining the url to redirect (typically comes from reverse router).public static Result temporaryRedirect(java.lang.String url)
url
- The url to redirect.