Object

io.finch.Endpoints

root

Related Doc: package Endpoints

Permalink

object root extends Endpoint[Request]

A root Endpoint that always matches and extracts the current request.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. root
  2. Endpoint
  3. AnyRef
  4. 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 :+:[B](that: Endpoint[B])(implicit a: Adjoin[:+:[B, :+:[Request, CNil]]]): Endpoint[shapeless.ops.adjoin.Adjoin.Out]

    Permalink

    Composes this endpoint with another in such a way that coproducts are flattened.

    Composes this endpoint with another in such a way that coproducts are flattened.

    Definition Classes
    Endpoint
  4. final def ::[B](other: Endpoint[B])(implicit pa: PairAdjoin[B, Request]): Endpoint[internal.PairAdjoin.Out]

    Permalink

    Composes this endpoint with the given Endpoint.

    Composes this endpoint with the given Endpoint.

    Definition Classes
    Endpoint
  5. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  6. final def apply(input: Input): Result[Request]

    Permalink

    Runs this endpoint.

    Runs this endpoint.

    Definition Classes
    rootEndpoint
  7. final def asInstanceOf[T0]: T0

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. final def coproduct[B >: Request](other: Endpoint[B]): Endpoint[B]

    Permalink

    Sequentially composes this endpoint with the given other endpoint.

    Sequentially composes this endpoint with the given other endpoint. The resulting endpoint will succeed if either this or that endpoints are succeed.

    Definition Classes
    Endpoint
  10. final def eq(arg0: AnyRef): Boolean

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  14. final def handle[B >: Request](pf: PartialFunction[Throwable, Output[B]]): Endpoint[B]

    Permalink

    Recovers from any exception occurred in this endpoint by creating a new endpoint that will handle any matching throwable from the underlying future.

    Recovers from any exception occurred in this endpoint by creating a new endpoint that will handle any matching throwable from the underlying future.

    Definition Classes
    Endpoint
  15. def hashCode(): Int

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

    Permalink
    Definition Classes
    Any
  17. def item: RequestItem

    Permalink

    Request item (part) that's this endpoint work with.

    Request item (part) that's this endpoint work with.

    Definition Classes
    Endpoint
  18. final def liftToTry: Endpoint[Try[Request]]

    Permalink

    Lifts this endpoint into one that always succeeds, with Try representing both success and failure cases.

    Lifts this endpoint into one that always succeeds, with Try representing both success and failure cases.

    Definition Classes
    Endpoint
  19. final def map[B](fn: (Request) ⇒ B): Endpoint[B]

    Permalink

    Maps this endpoint to the given function A => B.

    Maps this endpoint to the given function A => B.

    Definition Classes
    Endpoint
  20. final def mapAsync[B](fn: (Request) ⇒ Future[B]): Endpoint[B]

    Permalink

    Maps this endpoint to the given function A => Future[B].

    Maps this endpoint to the given function A => Future[B].

    Definition Classes
    Endpoint
  21. final def mapOutput[B](fn: (Request) ⇒ Output[B]): Endpoint[B]

    Permalink

    Maps this endpoint to the given function A => Output[B].

    Maps this endpoint to the given function A => Output[B].

    Definition Classes
    Endpoint
  22. final def mapOutputAsync[B](fn: (Request) ⇒ Future[Output[B]]): Endpoint[B]

    Permalink

    Maps this endpoint to the given function A => Future[Output[B]].

    Maps this endpoint to the given function A => Future[Output[B]].

    Definition Classes
    Endpoint
  23. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  26. final def product[B](other: Endpoint[B]): Endpoint[(Request, B)]

    Permalink

    Returns a product of this and other endpoint.

    Returns a product of this and other endpoint. The resulting endpoint returns a tuple of both values.

    This combinator is an important piece for Finch's error accumulation. In its current form, product will accumulate Finch's own errors (i.e., Errors) into Errors) and will fail-fast with the first non-Finch error (just ordinary Exception) observed.

    Definition Classes
    Endpoint
  27. final def productWith[B, O](other: Endpoint[B])(p: (Request, B) ⇒ O): Endpoint[O]

    Permalink

    Returns a product of this and other endpoint.

    Returns a product of this and other endpoint. The resulting endpoint returns a value of resulting type for product function.

    Definition Classes
    Endpoint
  28. final def rescue[B >: Request](pf: PartialFunction[Throwable, Future[Output[B]]]): Endpoint[B]

    Permalink

    Recovers from any exception occurred in this endpoint by creating a new endpoint that will handle any matching throwable from the underlying future.

    Recovers from any exception occurred in this endpoint by creating a new endpoint that will handle any matching throwable from the underlying future.

    Definition Classes
    Endpoint
  29. final def should(rule: ValidationRule[Request]): Endpoint[Request]

    Permalink

    Validates the result of this endpoint using a predefined rule.

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

    rule

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

    returns

    an endpoint that will return the value of this reader if it is valid. Otherwise the future fails with an Error.NotValid error.

    Definition Classes
    Endpoint
  30. final def should(rule: String)(predicate: (Request) ⇒ Boolean): Endpoint[Request]

    Permalink

    Validates the result of this endpoint using a predicate.

    Validates the result of this endpoint 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

    an endpoint that will return the value of this reader if it is valid. Otherwise the future fails with an Error.NotValid error.

    Definition Classes
    Endpoint
  31. final def shouldNot(rule: ValidationRule[Request]): Endpoint[Request]

    Permalink

    Validates the result of this endpoint using a predefined rule.

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

    rule

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

    returns

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

    Definition Classes
    Endpoint
  32. final def shouldNot(rule: String)(predicate: (Request) ⇒ Boolean): Endpoint[Request]

    Permalink

    Validates the result of this endpoint using a predicate.

    Validates the result of this endpoint 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

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

    Definition Classes
    Endpoint
  33. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  34. final def toService(implicit tr: ToResponse.Aux[Request, Json], tre: ToResponse.Aux[Exception, Json]): Service[Request, Response]

    Permalink

    Converts this endpoint to a Finagle service Request => Future[Response] that serves JSON.

    Converts this endpoint to a Finagle service Request => Future[Response] that serves JSON.

    Consider using Bootstrap instead.

    Definition Classes
    Endpoint
  35. final def toServiceAs[CT <: String](implicit tr: ToResponse.Aux[Request, CT], tre: ToResponse.Aux[Exception, CT]): Service[Request, Response]

    Permalink

    Converts this endpoint to a Finagle service Request => Future[Response] that serves custom content-type CT.

    Converts this endpoint to a Finagle service Request => Future[Response] that serves custom content-type CT.

    Consider using Bootstrap instead.

    Definition Classes
    Endpoint
  36. final def toString(): String

    Permalink
    Definition Classes
    root → AnyRef → Any
  37. final def transform[B](fn: (Future[Output[Request]]) ⇒ Future[Output[B]]): Endpoint[B]

    Permalink

    Transforms this endpoint to the given function Future[Output[A]] => Future[Output[B]].

    Transforms this endpoint to the given function Future[Output[A]] => Future[Output[B]].

    Might be useful to perform some extra action on the underlying Future. For example, time the latency of the given endpoint.

    import io.finch._
    import com.twitter.finagle.stats._
    
    def time[A](stat: Stat, e: Endpoint[A]): Endpoint[A] =
      e.transform(f => Stat.timeFuture(s)(f))
    Definition Classes
    Endpoint
  38. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  41. final def withCharset(charset: Charset): Endpoint[Request]

    Permalink
    Definition Classes
    Endpoint
  42. final def withCookie(cookie: Cookie): Endpoint[Request]

    Permalink
    Definition Classes
    Endpoint
  43. final def withHeader(header: (String, String)): Endpoint[Request]

    Permalink
    Definition Classes
    Endpoint
  44. final def withToString(ts: ⇒ String): Endpoint[Request]

    Permalink

    Overrides the toString method on this endpoint.

    Overrides the toString method on this endpoint.

    Definition Classes
    Endpoint

Inherited from Endpoint[Request]

Inherited from AnyRef

Inherited from Any

Ungrouped