Trait/Object

io.finch.request

PRequestReader

Related Docs: object PRequestReader | package request

Permalink

trait PRequestReader[R, A] extends AnyRef

A polymorphic request reader (a reader monad) that reads a com.twitter.util.Future of A from the request of type R.

Self Type
PRequestReader[R, A]
Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. PRequestReader
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def apply(req: R): Future[A]

    Permalink

    Reads the data from given request req.

    Reads the data from given request req.

    req

    the request to read

  2. abstract def item: RequestItem

    Permalink

    A RequestItem read by this request reader.

Concrete 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. final def asInstanceOf[T0]: T0

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. def embedFlatMap[B](fn: (A) ⇒ Future[B]): PRequestReader[R, B]

    Permalink

    Flat-maps this request reader to the given function A => Future[B].

  7. final def eq(arg0: AnyRef): Boolean

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. def flatMap[S, B](fn: (A) ⇒ PRequestReader[S, B])(implicit ev: %>[R, S]): PRequestReader[R, B]

    Permalink

    Flat-maps this request reader to the given function A => PRequestReader[R, B].

  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 lift: PRequestReader[R, Option[A]]

    Permalink

    Lifts this request reader into one that always succeeds, with an empty option representing failure.

  15. def map[B](fn: (A) ⇒ B): PRequestReader[R, B]

    Permalink

    Maps this request reader to the given function A => B.

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

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

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

    Permalink
    Definition Classes
    AnyRef
  19. def should(rule: ValidationRule[A]): PRequestReader[R, A]

    Permalink

    Validates the result of this request reader using a predefined rule.

    Validates the result of this request reader using a predefined rule. This method allows for rules to be reused across multiple request readers.

    rule

    the predefined ValidationRule that will return true if the data is valid

    returns

    a request reader that will return the value of this reader if it is valid. Otherwise the future fails with a NotValid error.

  20. def should(rule: String)(predicate: (A) ⇒ Boolean): PRequestReader[R, A]

    Permalink

    Validates the result of this request reader using a predicate.

    Validates the result of this request reader using a predicate. The rule is used for error reporting.

    rule

    text describing the rule being validated

    predicate

    returns true if the data is valid

    returns

    a request reader that will return the value of this reader if it is valid. Otherwise the future fails with a NotValid error.

  21. def shouldNot(rule: ValidationRule[A]): PRequestReader[R, A]

    Permalink

    Validates the result of this request reader using a predefined rule.

    Validates the result of this request reader using a predefined rule. This method allows for rules to be reused across multiple request readers.

    rule

    the predefined ValidationRule that will return false if the data is valid

    returns

    a request reader that will return the value of this reader if it is valid. Otherwise the future fails with a NotValid error.

  22. def shouldNot(rule: String)(predicate: (A) ⇒ Boolean): PRequestReader[R, A]

    Permalink

    Validates the result of this request reader using a predicate.

    Validates the result of this request reader using a predicate. The rule is used for error reporting.

    rule

    text describing the rule being validated

    predicate

    returns false if the data is valid

    returns

    a request reader that will return the value of this reader if it is valid. Otherwise the future fails with a NotValid error.

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

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. def withFilter(p: (A) ⇒ Boolean): PRequestReader[R, A]

    Permalink

    Applies the given filter p to this request reader.

Inherited from AnyRef

Inherited from Any

Ungrouped