play.mvc
Class Results

java.lang.Object
  extended by play.mvc.Results
Direct Known Subclasses:
Action, Controller, Security.Authenticator

public class Results
extends java.lang.Object

Common results.


Nested Class Summary
static class Results.AsyncResult
          Deprecated. return Promise<Result> from your actions instead.
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.
 
Field Summary
static Result TODO
          Generates a 501 NOT_IMPLEMENTED simple result.
 
Constructor Summary
Results()
           
 
Method Summary
static
<R extends Result>
Results.AsyncResult
async(F.Promise<R> p)
          Deprecated. Return Promise<Result> from your action instead
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 file result as an attachment.
static Results.Status badRequest(java.io.File content, boolean inline)
          Generates a 400 BAD_REQUEST file result.
static Results.Status badRequest(java.io.File content, int chunkSize)
          Deprecated. Since the length of the file is known, there is little reason to send a file as chunked.
static Results.Status badRequest(java.io.File content, java.lang.String filename)
          Generates a 400 BAD_REQUEST file result as an attachment.
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(com.fasterxml.jackson.databind.JsonNode content)
          Generates a 400 BAD_REQUEST simple result.
static Results.Status badRequest(com.fasterxml.jackson.databind.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 file result as an attachment.
static Results.Status created(java.io.File content, boolean inline)
          Generates a 201 CREATED file result.
static Results.Status created(java.io.File content, int chunkSize)
          Deprecated. Since the length of the file is known, there is little reason to send a file as chunked.
static Results.Status created(java.io.File content, java.lang.String filename)
          Generates a 201 CREATED file result as an attachment.
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(com.fasterxml.jackson.databind.JsonNode content)
          Generates a 201 CREATED simple result.
static Results.Status created(com.fasterxml.jackson.databind.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 file result as an attachment.
static Results.Status forbidden(java.io.File content, boolean inline)
          Generates a 403 FORBIDDEN file result.
static Results.Status forbidden(java.io.File content, int chunkSize)
          Deprecated. Since the length of the file is known, there is little reason to send a file as chunked.
static Results.Status forbidden(java.io.File content, java.lang.String filename)
          Generates a 403 FORBIDDEN file result as an attachment.
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(com.fasterxml.jackson.databind.JsonNode content)
          Generates a 403 FORBIDDEN simple result.
static Results.Status forbidden(com.fasterxml.jackson.databind.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 SimpleResult found(Call call)
          Generates a 302 FOUND simple result.
static SimpleResult 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 file result as an attachment.
static Results.Status internalServerError(java.io.File content, boolean inline)
          Generates a 500 INTERNAL_SERVER_ERROR file result.
static Results.Status internalServerError(java.io.File content, int chunkSize)
          Deprecated. Since the length of the file is known, there is little reason to send a file as chunked.
static Results.Status internalServerError(java.io.File content, java.lang.String filename)
          Generates a 500 INTERNAL_SERVER_ERROR file result as an attachment.
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(com.fasterxml.jackson.databind.JsonNode content)
          Generates a 500 INTERNAL_SERVER_ERROR simple result.
static Results.Status internalServerError(com.fasterxml.jackson.databind.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 SimpleResult movedPermanently(Call call)
          Generates a 301 MOVED_PERMANENTLY simple result.
static SimpleResult 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 file result as an attachment.
static Results.Status notFound(java.io.File content, boolean inline)
          Generates a 404 NOT_FOUND file result.
static Results.Status notFound(java.io.File content, int chunkSize)
          Deprecated. Since the length of the file is known, there is little reason to send a file as chunked.
static Results.Status notFound(java.io.File content, java.lang.String filename)
          Generates a 404 NOT_FOUND file result as an attachment.
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(com.fasterxml.jackson.databind.JsonNode content)
          Generates a 404 NOT_FOUND simple result.
static Results.Status notFound(com.fasterxml.jackson.databind.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 file result as an attachment.
static Results.Status ok(java.io.File content, boolean inline)
          Generates a 200 OK file result.
static Results.Status ok(java.io.File content, int chunkSize)
          Deprecated. Since the length of the file is known, there is little reason to send a file as chunked.
static Results.Status ok(java.io.File content, java.lang.String filename)
          Generates a 200 OK file result as an attachment.
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(com.fasterxml.jackson.databind.JsonNode content)
          Generates a 200 OK simple result.
static Results.Status ok(com.fasterxml.jackson.databind.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 SimpleResult redirect(Call call)
          Generates a 303 SEE_OTHER simple result.
static SimpleResult redirect(java.lang.String url)
          Generates a 303 SEE_OTHER simple result.
static SimpleResult seeOther(Call call)
          Generates a 303 SEE_OTHER simple result.
static SimpleResult 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, com.fasterxml.jackson.databind.JsonNode content)
          Generates a simple result.
static Results.Status status(int status, com.fasterxml.jackson.databind.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 SimpleResult temporaryRedirect(Call call)
          Generates a 307 TEMPORARY_REDIRECT simple result.
static SimpleResult 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 file result as an attachment.
static Results.Status unauthorized(java.io.File content, boolean inline)
          Generates a 401 UNAUTHORIZED file result.
static Results.Status unauthorized(java.io.File content, int chunkSize)
          Deprecated. Since the length of the file is known, there is little reason to send a file as chunked.
static Results.Status unauthorized(java.io.File content, java.lang.String filename)
          Generates a 401 UNAUTHORIZED file result as an attachment.
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(com.fasterxml.jackson.databind.JsonNode content)
          Generates a 401 UNAUTHORIZED simple result.
static Results.Status unauthorized(com.fasterxml.jackson.databind.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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TODO

public static Result TODO
Generates a 501 NOT_IMPLEMENTED simple result.

Constructor Detail

Results

public Results()
Method Detail

async

@Deprecated
public static <R extends Result> Results.AsyncResult async(F.Promise<R> p)
Deprecated. Return Promise<Result> from your action instead

Handles an Asynchronous result.


status

public static Results.Status status(int status)
Generates a simple result.


status

public static Results.Status status(int status,
                                    Content content)
Generates a simple result.


status

public static Results.Status status(int status,
                                    Content content,
                                    java.lang.String charset)
Generates a simple result.


status

public static Results.Status status(int status,
                                    java.lang.String content)
Generates a simple result.


status

public static Results.Status status(int status,
                                    java.lang.String content,
                                    java.lang.String charset)
Generates a simple result.


status

public static Results.Status status(int status,
                                    com.fasterxml.jackson.databind.JsonNode content)
Generates a simple result.


status

public static Results.Status status(int status,
                                    com.fasterxml.jackson.databind.JsonNode content,
                                    java.lang.String charset)
Generates a simple result.


status

public static Results.Status status(int status,
                                    byte[] content)
Generates a simple result.


status

public static Results.Status status(int status,
                                    java.io.InputStream content)
Generates a chunked result.


status

public static Results.Status status(int status,
                                    java.io.InputStream content,
                                    int chunkSize)
Generates a chunked result.


status

public static Results.Status status(int status,
                                    java.io.File content)
Generates a chunked result.


status

public static Results.Status status(int status,
                                    java.io.File content,
                                    int chunkSize)
Generates a simple result.


status

public static Results.Status status(int status,
                                    Results.Chunks<?> chunks)
Generates a chunked result.


ok

public static Results.Status ok()
Generates a 200 OK simple result.


ok

public static Results.Status ok(Content content)
Generates a 200 OK simple result.


ok

public static Results.Status ok(Content content,
                                java.lang.String charset)
Generates a 200 OK simple result.


ok

public static Results.Status ok(java.lang.String content)
Generates a 200 OK simple result.


ok

public static Results.Status ok(java.lang.String content,
                                java.lang.String charset)
Generates a 200 OK simple result.


ok

public static Results.Status ok(com.fasterxml.jackson.databind.JsonNode content)
Generates a 200 OK simple result.


ok

public static Results.Status ok(com.fasterxml.jackson.databind.JsonNode content,
                                java.lang.String charset)
Generates a 200 OK simple result.


ok

public static Results.Status ok(byte[] content)
Generates a 200 OK simple result.


ok

public static Results.Status ok(java.io.InputStream content)
Generates a 200 OK chunked result.


ok

public static Results.Status ok(java.io.InputStream content,
                                int chunkSize)
Generates a 200 OK chunked result.


ok

public static Results.Status ok(java.io.File content)
Generates a 200 OK file result as an attachment.

Parameters:
content - The file to send.

ok

public static Results.Status ok(java.io.File content,
                                boolean inline)
Generates a 200 OK file result.

Parameters:
content - The file to send.
inline - Whether the file should be sent inline, or as an attachment.

ok

public static Results.Status ok(java.io.File content,
                                java.lang.String filename)
Generates a 200 OK file result as an attachment.

Parameters:
content - The file to send.
filename - The name to send the file as.

ok

@Deprecated
public static Results.Status ok(java.io.File content,
                                           int chunkSize)
Deprecated. Since the length of the file is known, there is little reason to send a file as chunked.

Generates a 200 OK file result, sent as a chunked response.


ok

public static Results.Status ok(Results.Chunks<?> chunks)
Generates a 200 OK chunked result.


created

public static Results.Status created()
Generates a 201 CREATED simple result.


created

public static Results.Status created(Content content)
Generates a 201 CREATED simple result.


created

public static Results.Status created(Content content,
                                     java.lang.String charset)
Generates a 201 CREATED simple result.


created

public static Results.Status created(java.lang.String content)
Generates a 201 CREATED simple result.


created

public static Results.Status created(java.lang.String content,
                                     java.lang.String charset)
Generates a 201 CREATED simple result.


created

public static Results.Status created(com.fasterxml.jackson.databind.JsonNode content)
Generates a 201 CREATED simple result.


created

public static Results.Status created(com.fasterxml.jackson.databind.JsonNode content,
                                     java.lang.String charset)
Generates a 201 CREATED simple result.


created

public static Results.Status created(byte[] content)
Generates a 201 CREATED simple result.


created

public static Results.Status created(java.io.InputStream content)
Generates a 201 CREATED chunked result.


created

public static Results.Status created(java.io.InputStream content,
                                     int chunkSize)
Generates a 201 CREATED chunked result.


created

public static Results.Status created(java.io.File content)
Generates a 201 CREATED file result as an attachment.

Parameters:
content - The file to send.

created

public static Results.Status created(java.io.File content,
                                     boolean inline)
Generates a 201 CREATED file result.

Parameters:
content - The file to send.
inline - Whether the file should be sent inline, or as an attachment.

created

public static Results.Status created(java.io.File content,
                                     java.lang.String filename)
Generates a 201 CREATED file result as an attachment.

Parameters:
content - The file to send.
filename - The name to send the file as.

created

@Deprecated
public static Results.Status created(java.io.File content,
                                                int chunkSize)
Deprecated. Since the length of the file is known, there is little reason to send a file as chunked.

Generates a 201 CREATED file result, sent as a chunked response.


created

public static Results.Status created(Results.Chunks<?> chunks)
Generates a 201 CREATED chunked result.


noContent

public static Results.Status noContent()
Generates a 204 NO_CONTENT simple result.


internalServerError

public static Results.Status internalServerError()
Generates a 500 INTERNAL_SERVER_ERROR simple result.


internalServerError

public static Results.Status internalServerError(Content content)
Generates a 500 INTERNAL_SERVER_ERROR simple result.


internalServerError

public static Results.Status internalServerError(Content content,
                                                 java.lang.String charset)
Generates a 500 INTERNAL_SERVER_ERROR simple result.


internalServerError

public static Results.Status internalServerError(java.lang.String content)
Generates a 500 INTERNAL_SERVER_ERROR simple result.


internalServerError

public static Results.Status internalServerError(java.lang.String content,
                                                 java.lang.String charset)
Generates a 500 INTERNAL_SERVER_ERROR simple result.


internalServerError

public static Results.Status internalServerError(com.fasterxml.jackson.databind.JsonNode content)
Generates a 500 INTERNAL_SERVER_ERROR simple result.


internalServerError

public static Results.Status internalServerError(com.fasterxml.jackson.databind.JsonNode content,
                                                 java.lang.String charset)
Generates a 500 INTERNAL_SERVER_ERROR simple result.


internalServerError

public static Results.Status internalServerError(byte[] content)
Generates a 500 INTERNAL_SERVER_ERROR simple result.


internalServerError

public static Results.Status internalServerError(java.io.InputStream content)
Generates a 500 INTERNAL_SERVER_ERROR chunked result.


internalServerError

public static Results.Status internalServerError(java.io.InputStream content,
                                                 int chunkSize)
Generates a 500 INTERNAL_SERVER_ERROR chunked result.


internalServerError

public static Results.Status internalServerError(java.io.File content)
Generates a 500 INTERNAL_SERVER_ERROR file result as an attachment.

Parameters:
content - The file to send.

internalServerError

public static Results.Status internalServerError(java.io.File content,
                                                 boolean inline)
Generates a 500 INTERNAL_SERVER_ERROR file result.

Parameters:
content - The file to send.
inline - Whether the file should be sent inline, or as an attachment.

internalServerError

public static Results.Status internalServerError(java.io.File content,
                                                 java.lang.String filename)
Generates a 500 INTERNAL_SERVER_ERROR file result as an attachment.

Parameters:
content - The file to send.
filename - The name to send the file as.

internalServerError

@Deprecated
public static Results.Status internalServerError(java.io.File content,
                                                            int chunkSize)
Deprecated. Since the length of the file is known, there is little reason to send a file as chunked.

Generates a 500 INTERNAL_SERVER_ERROR file result, sent as a chunked response.


internalServerError

public static Results.Status internalServerError(Results.Chunks<?> chunks)
Generates a 500 INTERNAL_SERVER_ERROR chunked result.


notFound

public static Results.Status notFound()
Generates a 404 NOT_FOUND simple result.


notFound

public static Results.Status notFound(Content content)
Generates a 404 NOT_FOUND simple result.


notFound

public static Results.Status notFound(Content content,
                                      java.lang.String charset)
Generates a 404 NOT_FOUND simple result.


notFound

public static Results.Status notFound(java.lang.String content)
Generates a 404 NOT_FOUND simple result.


notFound

public static Results.Status notFound(java.lang.String content,
                                      java.lang.String charset)
Generates a 404 NOT_FOUND simple result.


notFound

public static Results.Status notFound(com.fasterxml.jackson.databind.JsonNode content)
Generates a 404 NOT_FOUND simple result.


notFound

public static Results.Status notFound(com.fasterxml.jackson.databind.JsonNode content,
                                      java.lang.String charset)
Generates a 404 NOT_FOUND simple result.


notFound

public static Results.Status notFound(byte[] content)
Generates a 404 NOT_FOUND simple result.


notFound

public static Results.Status notFound(java.io.InputStream content)
Generates a 404 NOT_FOUND chunked result.


notFound

public static Results.Status notFound(java.io.InputStream content,
                                      int chunkSize)
Generates a 404 NOT_FOUND chunked result.


notFound

public static Results.Status notFound(java.io.File content)
Generates a 404 NOT_FOUND file result as an attachment.

Parameters:
content - The file to send.

notFound

public static Results.Status notFound(java.io.File content,
                                      boolean inline)
Generates a 404 NOT_FOUND file result.

Parameters:
content - The file to send.
inline - Whether the file should be sent inline, or as an attachment.

notFound

public static Results.Status notFound(java.io.File content,
                                      java.lang.String filename)
Generates a 404 NOT_FOUND file result as an attachment.

Parameters:
content - The file to send.
filename - The name to send the file as.

notFound

@Deprecated
public static Results.Status notFound(java.io.File content,
                                                 int chunkSize)
Deprecated. Since the length of the file is known, there is little reason to send a file as chunked.

Generates a 404 NOT_FOUND file result, sent as a chunked response.


notFound

public static Results.Status notFound(Results.Chunks<?> chunks)
Generates a 404 NOT_FOUND chunked result.


forbidden

public static Results.Status forbidden()
Generates a 403 FORBIDDEN simple result.


forbidden

public static Results.Status forbidden(Content content)
Generates a 403 FORBIDDEN simple result.


forbidden

public static Results.Status forbidden(Content content,
                                       java.lang.String charset)
Generates a 403 FORBIDDEN simple result.


forbidden

public static Results.Status forbidden(java.lang.String content)
Generates a 403 FORBIDDEN simple result.


forbidden

public static Results.Status forbidden(java.lang.String content,
                                       java.lang.String charset)
Generates a 403 FORBIDDEN simple result.


forbidden

public static Results.Status forbidden(com.fasterxml.jackson.databind.JsonNode content)
Generates a 403 FORBIDDEN simple result.


forbidden

public static Results.Status forbidden(com.fasterxml.jackson.databind.JsonNode content,
                                       java.lang.String charset)
Generates a 403 FORBIDDEN simple result.


forbidden

public static Results.Status forbidden(byte[] content)
Generates a 403 FORBIDDEN simple result.


forbidden

public static Results.Status forbidden(java.io.InputStream content)
Generates a 403 FORBIDDEN chunked result.


forbidden

public static Results.Status forbidden(java.io.InputStream content,
                                       int chunkSize)
Generates a 403 FORBIDDEN chunked result.


forbidden

public static Results.Status forbidden(java.io.File content)
Generates a 403 FORBIDDEN file result as an attachment.

Parameters:
content - The file to send.

forbidden

public static Results.Status forbidden(java.io.File content,
                                       boolean inline)
Generates a 403 FORBIDDEN file result.

Parameters:
content - The file to send.
inline - Whether the file should be sent inline, or as an attachment.

forbidden

public static Results.Status forbidden(java.io.File content,
                                       java.lang.String filename)
Generates a 403 FORBIDDEN file result as an attachment.

Parameters:
content - The file to send.
filename - The name to send the file as.

forbidden

@Deprecated
public static Results.Status forbidden(java.io.File content,
                                                  int chunkSize)
Deprecated. Since the length of the file is known, there is little reason to send a file as chunked.

Generates a 403 FORBIDDEN file result, sent as a chunked response.


forbidden

public static Results.Status forbidden(Results.Chunks<?> chunks)
Generates a 403 FORBIDDEN chunked result.


unauthorized

public static Results.Status unauthorized()
Generates a 401 UNAUTHORIZED simple result.


unauthorized

public static Results.Status unauthorized(Content content)
Generates a 401 UNAUTHORIZED simple result.


unauthorized

public static Results.Status unauthorized(Content content,
                                          java.lang.String charset)
Generates a 401 UNAUTHORIZED simple result.


unauthorized

public static Results.Status unauthorized(java.lang.String content)
Generates a 401 UNAUTHORIZED simple result.


unauthorized

public static Results.Status unauthorized(java.lang.String content,
                                          java.lang.String charset)
Generates a 401 UNAUTHORIZED simple result.


unauthorized

public static Results.Status unauthorized(com.fasterxml.jackson.databind.JsonNode content)
Generates a 401 UNAUTHORIZED simple result.


unauthorized

public static Results.Status unauthorized(com.fasterxml.jackson.databind.JsonNode content,
                                          java.lang.String charset)
Generates a 401 UNAUTHORIZED simple result.


unauthorized

public static Results.Status unauthorized(byte[] content)
Generates a 401 UNAUTHORIZED simple result.


unauthorized

public static Results.Status unauthorized(java.io.InputStream content)
Generates a 401 UNAUTHORIZED chunked result.


unauthorized

public static Results.Status unauthorized(java.io.InputStream content,
                                          int chunkSize)
Generates a 401 UNAUTHORIZED chunked result.


unauthorized

public static Results.Status unauthorized(java.io.File content)
Generates a 401 UNAUTHORIZED file result as an attachment.

Parameters:
content - The file to send.

unauthorized

public static Results.Status unauthorized(java.io.File content,
                                          boolean inline)
Generates a 401 UNAUTHORIZED file result.

Parameters:
content - The file to send.
inline - Whether the file should be sent inline, or as an attachment.

unauthorized

public static Results.Status unauthorized(java.io.File content,
                                          java.lang.String filename)
Generates a 401 UNAUTHORIZED file result as an attachment.

Parameters:
content - The file to send.
filename - The name to send the file as.

unauthorized

@Deprecated
public static Results.Status unauthorized(java.io.File content,
                                                     int chunkSize)
Deprecated. Since the length of the file is known, there is little reason to send a file as chunked.

Generates a 401 UNAUTHORIZED file result, sent as a chunked response.


unauthorized

public static Results.Status unauthorized(Results.Chunks<?> chunks)
Generates a 401 UNAUTHORIZED chunked result.


badRequest

public static Results.Status badRequest()
Generates a 400 BAD_REQUEST simple result.


badRequest

public static Results.Status badRequest(Content content)
Generates a 400 BAD_REQUEST simple result.


badRequest

public static Results.Status badRequest(Content content,
                                        java.lang.String charset)
Generates a 400 BAD_REQUEST simple result.


badRequest

public static Results.Status badRequest(java.lang.String content)
Generates a 400 BAD_REQUEST simple result.


badRequest

public static Results.Status badRequest(java.lang.String content,
                                        java.lang.String charset)
Generates a 400 BAD_REQUEST simple result.


badRequest

public static Results.Status badRequest(com.fasterxml.jackson.databind.JsonNode content)
Generates a 400 BAD_REQUEST simple result.


badRequest

public static Results.Status badRequest(com.fasterxml.jackson.databind.JsonNode content,
                                        java.lang.String charset)
Generates a 400 BAD_REQUEST simple result.


badRequest

public static Results.Status badRequest(byte[] content)
Generates a 400 BAD_REQUEST simple result.


badRequest

public static Results.Status badRequest(java.io.InputStream content)
Generates a 400 BAD_REQUEST chunked result.


badRequest

public static Results.Status badRequest(java.io.InputStream content,
                                        int chunkSize)
Generates a 400 BAD_REQUEST chunked result.


badRequest

public static Results.Status badRequest(java.io.File content)
Generates a 400 BAD_REQUEST file result as an attachment.

Parameters:
content - The file to send.

badRequest

public static Results.Status badRequest(java.io.File content,
                                        boolean inline)
Generates a 400 BAD_REQUEST file result.

Parameters:
content - The file to send.
inline - Whether the file should be sent inline, or as an attachment.

badRequest

public static Results.Status badRequest(java.io.File content,
                                        java.lang.String filename)
Generates a 400 BAD_REQUEST file result as an attachment.

Parameters:
content - The file to send.
filename - The name to send the file as.

badRequest

@Deprecated
public static Results.Status badRequest(java.io.File content,
                                                   int chunkSize)
Deprecated. Since the length of the file is known, there is little reason to send a file as chunked.

Generates a 400 BAD_REQUEST file result, sent as a chunked response.


badRequest

public static Results.Status badRequest(Results.Chunks<?> chunks)
Generates a 400 BAD_REQUEST chunked result.


redirect

public static SimpleResult redirect(java.lang.String url)
Generates a 303 SEE_OTHER simple result.

Parameters:
url - The url to redirect.

redirect

public static SimpleResult redirect(Call call)
Generates a 303 SEE_OTHER simple result.

Parameters:
call - Call defining the url to redirect (typically comes from reverse router).

found

public static SimpleResult found(java.lang.String url)
Generates a 302 FOUND simple result.

Parameters:
url - The url to redirect.

found

public static SimpleResult found(Call call)
Generates a 302 FOUND simple result.

Parameters:
call - Call defining the url to redirect (typically comes from reverse router).

movedPermanently

public static SimpleResult movedPermanently(java.lang.String url)
Generates a 301 MOVED_PERMANENTLY simple result.

Parameters:
url - The url to redirect.

movedPermanently

public static SimpleResult movedPermanently(Call call)
Generates a 301 MOVED_PERMANENTLY simple result.

Parameters:
call - Call defining the url to redirect (typically comes from reverse router).

seeOther

public static SimpleResult seeOther(java.lang.String url)
Generates a 303 SEE_OTHER simple result.

Parameters:
url - The url to redirect.

seeOther

public static SimpleResult seeOther(Call call)
Generates a 303 SEE_OTHER simple result.

Parameters:
call - Call defining the url to redirect (typically comes from reverse router).

temporaryRedirect

public static SimpleResult temporaryRedirect(java.lang.String url)
Generates a 307 TEMPORARY_REDIRECT simple result.

Parameters:
url - The url to redirect.

temporaryRedirect

public static SimpleResult temporaryRedirect(Call call)
Generates a 307 TEMPORARY_REDIRECT simple result.

Parameters:
call - Call defining the url to redirect (typically comes from reverse router).