Packages

sealed abstract class EndpointResult[+A] extends AnyRef

A result returned from an Endpoint. This models Option[(Input, Future[Output])] and represents two cases:

  • Endpoint is matched (think of 200).
  • Endpoint is not matched (think of 404, 405, etc).

In its current state, EndpointResult.NotMatched represented with two cases:

  • EndpointResult.NotMatched (very generic result usually indicating 404)
  • EndpointResult.NotMatched.MethodNotAllowed (indicates 405)

API methods exposed on this type are mostly introduced for testing.

This class also provides various of awaitX methods useful for testing and experimenting.

Source
EndpointResult.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. EndpointResult
  2. AnyRef
  3. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def isMatched: Boolean

    Whether the Endpoint is matched on a given Input.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String
    Implicit
    This member is added by an implicit conversion from EndpointResult[A] to any2stringadd[EndpointResult[A]] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (EndpointResult[A], B)
    Implicit
    This member is added by an implicit conversion from EndpointResult[A] to ArrowAssoc[EndpointResult[A]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. final def awaitOutput(d: Duration = Duration.Top): Option[Try[Output[A]]]

    Awaits for an Output wrapped with Try (indicating if the com.twitter.util.Future is failed).

    Awaits for an Output wrapped with Try (indicating if the com.twitter.util.Future is failed).

    returns

    Some(output) if this endpoint was matched on a given input, None otherwise.

    Note

    This method is blocking. Never use it in production.

  8. final def awaitOutputUnsafe(d: Duration = Duration.Top): Option[Output[A]]

    Awaits an Output of the Endpoint result or throws an exception if an underlying com.twitter.util.Future is failed.

    Awaits an Output of the Endpoint result or throws an exception if an underlying com.twitter.util.Future is failed.

    returns

    Some(output) if this endpoint was matched on a given input, None otherwise.

    Note

    This method is blocking. Never use it in production.

  9. final def awaitValue(d: Duration = Duration.Top): Option[Try[A]]

    Awaits a value from the Output wrapped with Try (indicating if either the com.twitter.util.Future is failed or Output wasn't a payload).

    Awaits a value from the Output wrapped with Try (indicating if either the com.twitter.util.Future is failed or Output wasn't a payload).

    returns

    Some(value) if this endpoint was matched on a given input, None otherwise.

    Note

    This method is blocking. Never use it in production.

  10. final def awaitValueUnsafe(d: Duration = Duration.Top): Option[A]

    Awaits a value from the Output or throws an exception if either an underlying com.twitter.util.Future is failed or Output wasn't a payload.

    Awaits a value from the Output or throws an exception if either an underlying com.twitter.util.Future is failed or Output wasn't a payload.

    returns

    Some(value) if this endpoint was matched on a given input, None otherwise.

    Note

    @note This method is blocking. Never use it in production.

  11. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  12. def ensuring(cond: (EndpointResult[A]) ⇒ Boolean, msg: ⇒ Any): EndpointResult[A]
    Implicit
    This member is added by an implicit conversion from EndpointResult[A] to Ensuring[EndpointResult[A]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  13. def ensuring(cond: (EndpointResult[A]) ⇒ Boolean): EndpointResult[A]
    Implicit
    This member is added by an implicit conversion from EndpointResult[A] to Ensuring[EndpointResult[A]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  14. def ensuring(cond: Boolean, msg: ⇒ Any): EndpointResult[A]
    Implicit
    This member is added by an implicit conversion from EndpointResult[A] to Ensuring[EndpointResult[A]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  15. def ensuring(cond: Boolean): EndpointResult[A]
    Implicit
    This member is added by an implicit conversion from EndpointResult[A] to Ensuring[EndpointResult[A]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  16. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  18. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  19. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from EndpointResult[A] to StringFormat[EndpointResult[A]] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  20. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  21. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  22. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  23. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  24. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  25. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  26. final def output: Option[Future[Output[A]]]

    Runs and returns the Output (wrapped with future) after an Endpoint is matched.

    Runs and returns the Output (wrapped with future) after an Endpoint is matched.

    returns

    Some(output) if this endpoint was matched on a given input, None otherwise.

  27. final def remainder: Option[Input]

    Returns the remainder of the Input after an Endpoint is matched.

    Returns the remainder of the Input after an Endpoint is matched.

    returns

    Some(remainder) if this endpoint was matched on a given input, None otherwise.

  28. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  29. def toString(): String
    Definition Classes
    AnyRef → Any
  30. final def trace: Option[Trace]

    Returns the Trace if an Endpoint is matched.

    Returns the Trace if an Endpoint is matched.

    returns

    Some(trace) if this endpoint is matched on a given input, None otherwise.

  31. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  34. def [B](y: B): (EndpointResult[A], B)
    Implicit
    This member is added by an implicit conversion from EndpointResult[A] to ArrowAssoc[EndpointResult[A]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from EndpointResult[A] to any2stringadd[EndpointResult[A]]

Inherited by implicit conversion StringFormat from EndpointResult[A] to StringFormat[EndpointResult[A]]

Inherited by implicit conversion Ensuring from EndpointResult[A] to Ensuring[EndpointResult[A]]

Inherited by implicit conversion ArrowAssoc from EndpointResult[A] to ArrowAssoc[EndpointResult[A]]

Ungrouped