Object/Class

quasar.api

QResponse

Related Docs: class QResponse | package api

Permalink

object QResponse extends Serializable

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

Type Members

  1. final class HttpResponseStreamFailureException extends Exception

    Permalink

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. val PROCESS_EFFECT_THRESHOLD_BYTES: Long

    Permalink

    Producing this many bytes from a Process[F, ByteVector] should require at least one F effect.

    Producing this many bytes from a Process[F, ByteVector] should require at least one F effect.

    The scenarios this is intended to handle involve prepending a small wrapper around a stream, like "[\n" when outputting JSON data in an array, and thus 100 bytes seemed large enough to contain these cases and small enough as to not force more than is needed.

    This exists because of how http4s handles errors from Process responses. If an error is produced by a Process while streaming the connection is severed, but the headers and status code have already been emitted to the wire so it isn't possible to emit a useful error message or status. In an attempt to handle many common scenarios where the first effect in the stream is the most likely to error (i.e. opening a file, or other resource to stream from) we'd like to step the stream until we've reached the first F effect so that we can see if it succeeds before continuing with the rest of the stream, providing a chance to respond with an error in the failure case.

    We cannot just Process.unemit the Process as there may be non-F Await steps encountered before an actual F effect (from many of the combinators in process1 and the like).

    This leads us to the current workaround which is to define this threshold which should be, ideally, just large enough to require the first F to produce the bytes, but not more. We then consume the byte stream until it ends or we've consumed this many bytes. Finally we have a chance to inspect the F and see if anything failed before handing the rest of the process to http4s to continue streaming to the client as normal.

  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def body[S[_]]: PLens[QResponse[S], QResponse[S], Process[[β$1$]Free[S, β$1$], ByteVector], Process[[β$1$]Free[S, β$1$], ByteVector]]

    Permalink
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def empty[S[_]]: QResponse[S]

    Permalink
  9. final def eq(arg0: AnyRef): Boolean

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

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  14. def header[S[_]](key: Extractable): Optional[QResponse[S], org.http4s.HeaderKey.Extractable.HeaderT]

    Permalink
  15. def headers[S[_]]: PLens[QResponse[S], QResponse[S], Headers, Headers]

    Permalink
  16. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  17. def json[A, S[_]](status: Status, a: A)(implicit arg0: EncodeJson[A]): QResponse[S]

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

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

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

    Permalink
    Definition Classes
    AnyRef
  21. def ok[S[_]]: QResponse[S]

    Permalink
  22. def response[S[_], A](status: Status, a: A)(implicit E: EntityEncoder[A], S0: :<:[Task, S]): QResponse[S]

    Permalink
  23. def status[S[_]]: PLens[QResponse[S], QResponse[S], Status, Status]

    Permalink
  24. def streaming[S[_], A, E](p: Process[[γ$13$]EitherT[[β$12$]Free[S, β$12$], E, γ$13$], A])(implicit A: EntityEncoder[A], S0: :<:[Task, S], S1: :<:[[β$14$]Failure[E, β$14$], S]): QResponse[S]

    Permalink
  25. def streaming[S[_], A](p: Process[[β$9$]Free[S, β$9$], A])(implicit E: EntityEncoder[A], S0: :<:[Task, S]): QResponse[S]

    Permalink
    Annotations
    @SuppressWarnings()
  26. def string[S[_]](status: Status, s: slamdata.Predef.String): QResponse[S]

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

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

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

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

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

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

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped