February 2018
Intermediate to advanced
552 pages
13h 46m
English
In Lagom Framework, we use the Service Descriptor to define the Lagom API interface. We define this Service Descriptor by overriding the descriptor function, which is defined in the service interface.
The service trait is defined with that descriptor function and some utilities, as shown here:
package com.lightbend.lagom.scaladsl.api
trait Service {
def descriptor: Descriptor
}
object Service {
def named(name: String): Descriptor = Descriptor(name)
def call[Request, Response](method: ScalaMethodServiceCall[Request, Response]): Call[Request, Response]
def namedCall[Request, Response](name: String, method: ScalaMethodServiceCall[Request, Response]): Call[Request, Response] def pathCall[Request, Response](pathPattern: ...Read now
Unlock full access