Packages

class ResponseBuilder extends AnyRef

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ResponseBuilder
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new ResponseBuilder(objectMapper: ScalaObjectMapper, fileResolver: FileResolver, messageBodyManager: MessageBodyManager, statsReceiver: StatsReceiver, includeContentTypeCharset: Boolean)
    Annotations
    @Inject()

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def accepted(body: Any): EnrichedResponse

    Returns an HTTP 201 Created response with a written body.

    Returns an HTTP 201 Created response with a written body.

    body

    the response body, or the information needed to render the body

  5. def accepted: EnrichedResponse

    Returns an HTTP 201 Created response.

  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def badGateway: EnrichedResponse

    Returns an HTTP 502 Bad Gateway response.

  8. def badRequest(body: Any): EnrichedResponse

    Returns an HTTP 400 Bad Request response with a written body.

    Returns an HTTP 400 Bad Request response with a written body.

    body

    the response body, or the information needed to render the body

  9. def badRequest: EnrichedResponse

    Returns an HTTP 400 Bad Request response.

  10. def clientClosed: EnrichedResponse

    Returns an HTTP 499 Client Closed response

  11. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  12. def conflict(body: Any): EnrichedResponse

    Returns an HTTP 409 Conflict response with a written body.

    Returns an HTTP 409 Conflict response with a written body.

    body

    the response body, or the information needed to render the body

  13. def conflict: EnrichedResponse

    Returns an HTTP 409 Conflict response.

  14. def create(response: Response): EnrichedResponse

    Generic method to wrap a com.twitter.finagle.http.Response with this builder for augmenting the response.

    Generic method to wrap a com.twitter.finagle.http.Response with this builder for augmenting the response.

    response

    the com.twitter.finagle.http.Response to wrap.

  15. def created(body: Any): EnrichedResponse

    Returns an HTTP 201 Created response with a written body.

    Returns an HTTP 201 Created response with a written body.

    body

    the response body, or the information needed to render the body

  16. def created: EnrichedResponse

    Returns an HTTP 201 Created response.

  17. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  19. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  20. def forbidden(body: Any): EnrichedResponse

    Returns an HTTP 403 Forbidden response with a written body.

    Returns an HTTP 403 Forbidden response with a written body.

    body

    the response body, or the information needed to render the body

  21. def forbidden: EnrichedResponse

    Returns an HTTP 403 Forbidden response

  22. def found: EnrichedResponse

    Returns an HTTP 302 Found response.

  23. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  24. def gone(body: Any): EnrichedResponse

    Returns an HTTP 410 Gone response with a written body.

    Returns an HTTP 410 Gone response with a written body.

    body

    the response body, or the information needed to render the body

  25. def gone: EnrichedResponse

    Returns an HTTP 410 Gone response

  26. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  27. val htmlContentType: String

    Representation of the text/html content type governed by the includeContentTypeCharset Boolean which determines if the UTF-8 charset encoding parameter should be included in the content type.

    Representation of the text/html content type governed by the includeContentTypeCharset Boolean which determines if the UTF-8 charset encoding parameter should be included in the content type.

    See also

    com.twitter.finagle.http.MediaType.Html

    com.twitter.finagle.http.MediaType.HtmlUtf8

    MessageBodyFlags

  28. def internalServerError(body: Any): EnrichedResponse

    Returns an HTTP 500 Internal Server Error response with a written body.

    Returns an HTTP 500 Internal Server Error response with a written body.

    body

    the response body, or the information needed to render the body

  29. def internalServerError: EnrichedResponse

    Returns an HTTP 500 Internal Server Error response

  30. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  31. val jsonContentType: String

    Representation of the application/json content type governed by the includeContentTypeCharset Boolean which determines if the UTF-8 charset encoding parameter should be included in the content type.

    Representation of the application/json content type governed by the includeContentTypeCharset Boolean which determines if the UTF-8 charset encoding parameter should be included in the content type.

    See also

    com.twitter.finagle.http.MediaType.Json

    com.twitter.finagle.http.MediaType.JsonUtf8

    MessageBodyFlags

  32. def methodNotAllowed: EnrichedResponse

    Returns an HTTP 405 Method Not Allowed response.

  33. def movedPermanently(body: Any): EnrichedResponse

    Returns an HTTP 301 Moved Permanently response with a written body

    Returns an HTTP 301 Moved Permanently response with a written body

    body

    the response body, or the information needed to render the body

  34. def movedPermanently: EnrichedResponse

    Returns an HTTP 301 Moved Permanently response.

  35. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  36. def noContent: EnrichedResponse

    Returns an HTTP 204 No Content response.

  37. def notAcceptable(body: Any): EnrichedResponse

    Returns an HTTP 406 Not Acceptable response with a written body.

    Returns an HTTP 406 Not Acceptable response with a written body.

    body

    the response body, or the information needed to render the body

  38. def notAcceptable: EnrichedResponse

    Returns an HTTP 406 Not Acceptable response.

  39. def notFound(body: String): EnrichedResponse

    Returns an HTTP 404 Not Found response with a written String body.

    Returns an HTTP 404 Not Found response with a written String body.

    body

    the response body as a String

  40. def notFound(body: Any): EnrichedResponse

    Returns an HTTP 404 Not Found response with a written body.

    Returns an HTTP 404 Not Found response with a written body.

    body

    the response body, or the information needed to render the body

  41. def notFound: EnrichedResponse

    Returns an HTTP 404 Not Found response

  42. def notImplemented: EnrichedResponse

    Returns an HTTP 501 Not Implemented response

  43. def notModified: EnrichedResponse

    Returns an HTTP 304 Not Modified response.

  44. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  45. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  46. def ok(body: String): EnrichedResponse

    Returns an HTTP 200 OK response with a written String body.

    Returns an HTTP 200 OK response with a written String body.

    body

    the response body as a String

  47. def ok(request: Request, body: Any): EnrichedResponse

    Returns an HTTP 200 OK response with a written body, potentially based on values contained within the com.twitter.finagle.http.Request.

    Returns an HTTP 200 OK response with a written body, potentially based on values contained within the com.twitter.finagle.http.Request.

    request

    the HTTP com.twitter.finagle.http.Request associated with this response

    body

    the response body, or the information needed to render the body

    Note

    This version is useful when the body parameter requires custom message body rendering and values in the Request are required for decision making.

  48. def ok(body: Any): EnrichedResponse

    Returns an HTTP 200 OK response with a written body.

    Returns an HTTP 200 OK response with a written body.

    body

    the response body, or the information needed to render the body

  49. def ok: EnrichedResponse

    Returns an HTTP 200 OK response.

  50. val plainTextContentType: String

    Representation of the text/plain content type governed by the includeContentTypeCharset Boolean which determines if the UTF-8 charset encoding parameter should be included in the content type.

    Representation of the text/plain content type governed by the includeContentTypeCharset Boolean which determines if the UTF-8 charset encoding parameter should be included in the content type.

    See also

    com.twitter.finagle.http.MediaType.PlainText

    com.twitter.finagle.http.MediaType.PlainTextUtf8

    MessageBodyFlags

  51. def preconditionFailed(body: Any): EnrichedResponse

    Returns an HTTP 412 Precondition Failed response with a written body.

    Returns an HTTP 412 Precondition Failed response with a written body.

    body

    the response body, or the information needed to render the body

  52. def preconditionFailed: EnrichedResponse

    Returns an HTTP 412 Precondition Failed response

  53. def requestEntityTooLarge(body: Any): EnrichedResponse

    Returns an HTTP 413 Request Entity Too Large response with a written body.

    Returns an HTTP 413 Request Entity Too Large response with a written body.

    body

    the response body, or the information needed to render the body

  54. def requestEntityTooLarge: EnrichedResponse

    Returns an HTTP 413 Request Entity Too Large response

  55. def serviceUnavailable: EnrichedResponse

    Returns an HTTP 503 Service Unavailable response

  56. def status(responseStatus: Status): EnrichedResponse

    Returns a response with the given com.twitter.finagle.http.Status

    Returns a response with the given com.twitter.finagle.http.Status

    responseStatus

    the com.twitter.finagle.http.Status to set in the returned response

  57. def status(statusCode: Int): EnrichedResponse

    Returns a response with the given status code.

    Returns a response with the given status code.

    statusCode

    the HTTP status code to set in the returned response

  58. def streaming[F[_], A](stream: F[A])(implicit arg0: ToReader[F], arg1: Manifest[A]): StreamingResponse[F, A]

    Java support for streaming

  59. def streaming[F[_], A](stream: F[A], status: Status = Status.Ok, headers: Map[String, Seq[String]] = Map.empty)(implicit arg0: ToReader[F], arg1: Manifest[A]): StreamingResponse[F, A]

    Create a StreamingResponse which can be converted to a com.twitter.finagle.http.Response later.

    Create a StreamingResponse which can be converted to a com.twitter.finagle.http.Response later.

    F

    The Primitive Stream type.

    A

    The type of streaming values.

    stream

    The output stream.

    status

    Represents an HTTP status code.

    headers

    A Map of message headers.

  60. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  61. def temporaryRedirect: EnrichedResponse

    Returns an HTTP 307 Temporary Redirect response.

  62. def toString(): String
    Definition Classes
    AnyRef → Any
  63. def unauthorized(body: Any): EnrichedResponse

    Returns an HTTP 401 Unauthorized response with a written body.

    Returns an HTTP 401 Unauthorized response with a written body.

    body

    the response body, or the information needed to render the body

  64. def unauthorized: EnrichedResponse

    Returns an HTTP 401 Unauthorized response.

  65. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  66. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  67. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped