object ServerServiceCall

Source
ServerServiceCall.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ServerServiceCall
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def apply[Request, Response](serviceCall: (RequestHeader, Request) ⇒ Future[(ResponseHeader, Response)]): ServerServiceCall[Request, Response]

    A service call that can handle headers.

    A service call that can handle headers.

    This exists as a convenience function for implementing service calls that handle the request and response headers.

  5. def apply[Request, Response](serviceCall: (Request) ⇒ Future[Response]): ServerServiceCall[Request, Response]

    Factory for creating a ServerServiceCall.

    Factory for creating a ServerServiceCall.

    This exists as a convenience function for implementing service calls that need to be composed with other calls that handle headers.

  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  8. def compose[Request, Response](block: (RequestHeader) ⇒ ServerServiceCall[Request, Response]): ServerServiceCall[Request, Response]

    Compose a server service call.

    Compose a server service call.

    This is useful for implementing service call composition. For example:

    def authenticated[Request, Response]( authenticatedServiceCall: String => ServerServiceCall[Request, Response] ): ServerServiceCall[Request, Response] = {

    ServerServiceCall.compose { requestHeader =>

    // Get the logged in user ID val userId = requestHeader.principal.getOrElse { throw new NotAuthenticated("Not authenticated") }.getName

    // Pass the user id to the composed service call authenticatedServiceCall(userId) } }

    block

    The block that will do the composition.

    returns

    A service call.

  9. def composeAsync[Request, Response](block: (RequestHeader) ⇒ Future[ServerServiceCall[Request, Response]]): ServerServiceCall[Request, Response]

    Compose a header service call asynchronously.

    Compose a header service call asynchronously.

    This is useful for implementing service call composition. For example:

    def authenticated[Request, Response]( authenticatedServiceCall: String => ServerServiceCall[Request, Response] ): ServerServiceCall[Request, Response] = {

    ServerServiceCall.composeAsync { requestHeader =>

    // Get the logged in user ID val userId = requestHeader.principal.getOrElse { throw new NotAuthenticated("Not authenticated") }.getName

    // Load the user from the user service val userFuture: Future[User] = userService.loadUser(userId)

    // Pass the user to the composed service call userFuture.map(user => authenticatedServiceCall(user)) } }

    block

    The block that will do the composition.

    returns

    A service call.

  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  12. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  14. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  15. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  16. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  18. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  20. def toString(): String
    Definition Classes
    AnyRef → Any
  21. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped