org.http4s.server

Service

final class Service[A, B] extends AnyVal

A service is an asynchronous function from a request to an optional response. It wraps a function A => Task[Option[B]] with useful methods to deal with both the asynchronicity and the optionality.

A

the request type

B

the response type

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Service
  2. AnyVal
  3. NotNull
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  2. final def ##(): Int

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

    Definition Classes
    Any
  4. def apply(a: A): Task[Option[B]]

    Returns an asynchronous, optional response to a request

  5. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  6. def contramap[C](f: (C) ⇒ A): Service[C, B]

  7. def flatMap[C](f: (B) ⇒ Service[A, C]): Service[A, C]

  8. def flatMapTask[C](f: (B) ⇒ Task[Option[C]]): Service[A, C]

  9. def getClass(): Class[_ <: AnyVal]

    Definition Classes
    AnyVal → Any
  10. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  11. def map[C](f: (B) ⇒ C): Service[A, C]

  12. def or[B1 >: B](a: A, default: ⇒ Task[B1]): Task[B1]

    Returns a response from this service if defined, or else returns the supplied default response.

  13. def orElse[A1 <: A, B1 >: B](other: Service[A1, B1]): Service[A1, B1]

    Composes this service with a fallback service, which is invoked where this service is not defined.

  14. val run: (A) ⇒ Task[Option[B]]

    the underlying function

  15. def runT(a: A): OptionT[Task, B]

    Like apply, but returns a monad transformer.

  16. def toString(): String

    Definition Classes
    Any

Inherited from AnyVal

Inherited from NotNull

Inherited from Any

Ungrouped