Class/Object

com.twitter.finatra.http.response

ResponseBuilder

Related Docs: object ResponseBuilder | package response

Permalink

class ResponseBuilder extends Logging

Linear Supertypes
Logging, Logging, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ResponseBuilder
  2. Logging
  3. Logging
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

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

    Permalink
    Annotations
    @Inject()

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def accepted(body: Any): EnrichedResponse

    Permalink

    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

    Permalink

    Returns an HTTP 201 Created response.

  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def badGateway: EnrichedResponse

    Permalink

    Returns an HTTP 502 Bad Gateway response.

  8. def badRequest(body: Any): EnrichedResponse

    Permalink

    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

    Permalink

    Returns an HTTP 400 Bad Request response.

  10. def clientClosed: EnrichedResponse

    Permalink

    Returns an HTTP 499 Client Closed response

  11. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  12. def conflict(body: Any): EnrichedResponse

    Permalink

    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

    Permalink

    Returns an HTTP 409 Conflict response.

  14. def create(response: Response): EnrichedResponse

    Permalink

    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

    Permalink

    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

    Permalink

    Returns an HTTP 201 Created response.

  17. def debug(marker: Marker, message: ⇒ Any, cause: Throwable): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  18. def debug(message: ⇒ Any, cause: Throwable): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  19. def debug(marker: Marker, message: ⇒ Any): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  20. def debug(message: ⇒ Any): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  21. def debugFutureResult[T](msg: String)(func: ⇒ Future[T]): Future[T]

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  22. def debugResult[T](message: ⇒ String)(fn: ⇒ T): T

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  23. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  24. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  25. def error(marker: Marker, message: ⇒ Any, cause: Throwable): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  26. def error(message: ⇒ Any, cause: Throwable): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  27. def error(marker: Marker, message: ⇒ Any): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  28. def error(message: ⇒ Any): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  29. def errorResult[T](message: ⇒ String)(fn: ⇒ T): T

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  30. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  31. def forbidden(body: Any): EnrichedResponse

    Permalink

    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

  32. def forbidden: EnrichedResponse

    Permalink

    Returns an HTTP 403 Forbidden response

  33. def found: EnrichedResponse

    Permalink

    Returns an HTTP 302 Found response.

  34. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  35. def gone(body: Any): EnrichedResponse

    Permalink

    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

  36. def gone: EnrichedResponse

    Permalink

    Returns an HTTP 410 Gone response

  37. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  38. val htmlContentType: String

    Permalink

    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

    MessageBodyFlags

    com.twitter.finagle.http.MediaType.HtmlUtf8

    com.twitter.finagle.http.MediaType.Html

  39. def info(marker: Marker, message: ⇒ Any, cause: Throwable): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  40. def info(message: ⇒ Any, cause: Throwable): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  41. def info(marker: Marker, message: ⇒ Any): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  42. def info(message: ⇒ Any): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  43. def infoResult[T](message: ⇒ String)(fn: ⇒ T): T

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  44. def internalServerError(body: Any): EnrichedResponse

    Permalink

    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

  45. def internalServerError: EnrichedResponse

    Permalink

    Returns an HTTP 500 Internal Server Error response

  46. def isDebugEnabled(marker: Marker): Boolean

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  47. def isDebugEnabled: Boolean

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  48. def isErrorEnabled(marker: Marker): Boolean

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  49. def isErrorEnabled: Boolean

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  50. def isInfoEnabled(marker: Marker): Boolean

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  51. def isInfoEnabled: Boolean

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  52. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  53. def isTraceEnabled(marker: Marker): Boolean

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  54. def isTraceEnabled: Boolean

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  55. def isWarnEnabled(marker: Marker): Boolean

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  56. def isWarnEnabled: Boolean

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  57. val jsonContentType: String

    Permalink

    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

    MessageBodyFlags

    com.twitter.finagle.http.MediaType.JsonUtf8

    com.twitter.finagle.http.MediaType.Json

  58. final def logger: Logger

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  59. final def loggerName: String

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  60. def methodNotAllowed: EnrichedResponse

    Permalink

    Returns an HTTP 405 Method Not Allowed response.

  61. def movedPermanently(body: Any): EnrichedResponse

    Permalink

    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

  62. def movedPermanently: EnrichedResponse

    Permalink

    Returns an HTTP 301 Moved Permanently response.

  63. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  64. def noContent: EnrichedResponse

    Permalink

    Returns an HTTP 204 No Content response.

  65. def notAcceptable(body: Any): EnrichedResponse

    Permalink

    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

  66. def notAcceptable: EnrichedResponse

    Permalink

    Returns an HTTP 406 Not Acceptable response.

  67. def notFound(body: String): EnrichedResponse

    Permalink

    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

  68. def notFound(body: Any): EnrichedResponse

    Permalink

    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

  69. def notFound: EnrichedResponse

    Permalink

    Returns an HTTP 404 Not Found response

  70. def notImplemented: EnrichedResponse

    Permalink

    Returns an HTTP 501 Not Implemented response

  71. def notModified: EnrichedResponse

    Permalink

    Returns an HTTP 304 Not Modified response.

  72. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  73. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  74. def ok(body: String): EnrichedResponse

    Permalink

    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

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

    Permalink

    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.

  76. def ok(body: Any): EnrichedResponse

    Permalink

    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

  77. def ok: EnrichedResponse

    Permalink

    Returns an HTTP 200 OK response.

  78. val plainTextContentType: String

    Permalink

    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

    MessageBodyFlags

    com.twitter.finagle.http.MediaType.PlainTextUtf8

    com.twitter.finagle.http.MediaType.PlainText

  79. def preconditionFailed(body: Any): EnrichedResponse

    Permalink

    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

  80. def preconditionFailed: EnrichedResponse

    Permalink

    Returns an HTTP 412 Precondition Failed response

  81. def requestEntityTooLarge(body: Any): EnrichedResponse

    Permalink

    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

  82. def requestEntityTooLarge: EnrichedResponse

    Permalink

    Returns an HTTP 413 Request Entity Too Large response

  83. def serviceUnavailable: EnrichedResponse

    Permalink

    Returns an HTTP 503 Service Unavailable response

  84. def status(responseStatus: Status): EnrichedResponse

    Permalink

    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

  85. def status(statusCode: Int): EnrichedResponse

    Permalink

    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

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

    Permalink

    Java support for streaming

  87. 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]): streaming.StreamingResponse[F, A]

    Permalink

    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.

  88. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  89. def temporaryRedirect: EnrichedResponse

    Permalink

    Returns an HTTP 307 Temporary Redirect response.

  90. def time[T](formatStr: String)(func: ⇒ T): T

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  91. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  92. def trace(marker: Marker, message: ⇒ Any, cause: Throwable): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  93. def trace(message: ⇒ Any, cause: Throwable): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  94. def trace(marker: Marker, message: ⇒ Any): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  95. def trace(message: ⇒ Any): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  96. def traceResult[T](message: ⇒ String)(fn: ⇒ T): T

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  97. def unauthorized(body: Any): EnrichedResponse

    Permalink

    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

  98. def unauthorized: EnrichedResponse

    Permalink

    Returns an HTTP 401 Unauthorized response.

  99. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  100. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  101. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  102. def warn(marker: Marker, message: ⇒ Any, cause: Throwable): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  103. def warn(message: ⇒ Any, cause: Throwable): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  104. def warn(marker: Marker, message: ⇒ Any): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  105. def warn(message: ⇒ Any): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging
  106. def warnResult[T](message: ⇒ String)(fn: ⇒ T): T

    Permalink
    Attributes
    protected[this]
    Definition Classes
    Logging

Inherited from Logging

Inherited from Logging

Inherited from AnyRef

Inherited from Any

Ungrouped