Object/Class

com.twitter.finatra.http.response

StreamingResponse

Related Docs: class StreamingResponse | package response

Permalink

object StreamingResponse

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

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 apply[T](toBuf: (T) ⇒ Buf, status: Status = Status.Ok, headers: Map[String, String] = Map(), prefix: Option[Buf] = None, separator: Option[Buf] = None, suffix: Option[Buf] = None, closeOnFinish: Closable = Closable.nop, closeGracePeriod: Duration = Duration.Zero)(asyncStream: ⇒ AsyncStream[T]): StreamingResponse[T, Unit]

    Permalink

    Construct a StreamingResponse from an AsyncStream and a toBuf

    Construct a StreamingResponse from an AsyncStream and a toBuf

    toBuf

    Function for converting messages to a binary Buf representation.

    status

    Status code of the generated response.

    headers

    Headers for the generated response.

    prefix

    Optional first chunk of the response body. Note that a separator will not be added between the prefix and the elements of the AsyncStream.

    separator

    Separator to be interleaved between each result of the AsyncStream.

    suffix

    Suffix to append to the end of the AsyncStream. Note that a separator will not be included between the last stream chunk and the suffix.

    closeOnFinish

    A hook for cleaning up resources after completion of the rendering process. Note that this will be called regardless of whether rendering the body is successful.

    closeGracePeriod

    The grace period provided to the closeable in closeOnFinish

    asyncStream

    The data that will represent the body of the response.

  5. def apply[T, U](streamTransformer: (AsyncStream[T]) ⇒ AsyncStream[(U, Buf)], status: Status, headers: Map[String, String], onWrite: (U, Buf) ⇒ (Try[Unit]) ⇒ Unit, onDisconnect: () ⇒ Unit, closeGracePeriod: Duration)(asyncStream: ⇒ AsyncStream[T]): StreamingResponse[T, U]

    Permalink

    Construct a StreamingResponse from an AsyncStream and an AsyncStream[T] => AsyncStream[(U, Buf)]

    Construct a StreamingResponse from an AsyncStream and an AsyncStream[T] => AsyncStream[(U, Buf)]

    A StreamingResponse is useful for streaming data back to the client in chunks: data will be rendered to the client as it resolves from the AsyncStream while also utilizing the back-pressure mechanisms provide by the underlying transport, preventing unnecessary resource consumption for properly constructed AsyncStreams.

    T

    The incoming type.

    U

    An auxiliary type passed to onWrite which may be helpful when executing the onWrite callback.

    streamTransformer

    Function which converts AsyncStream[T] to AsyncStream[(U, Buf)]

    status

    Status code of the generated response.

    headers

    Headers for the generated response.

    onDisconnect

    A hook to clean up resources upon disconnection, either normally or exceptionally.

    closeGracePeriod

    The grace period provided to close the Response.writer.

    asyncStream

    The data that will represent the body of the response.

  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  12. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  14. def jsonArray[T](toBuf: (T) ⇒ Buf, status: Status = Status.Ok, headers: Map[String, String] = Map(), closeOnFinish: Closable = Closable.nop, asyncStream: ⇒ AsyncStream[T]): StreamingResponse[T, Unit]

    Permalink
  15. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  16. final def notify(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  18. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  19. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  20. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped