Implementing a Lagom service

We have seen already how to define a service. The next natural step is to implement the service interface, and this is materialized in the hello-impl project. The HelloServiceImpl class is responsible for implementing your API interface. We have seen this throughout the code snippets listed earlier. One important thing to notice is that all the methods don't actually execute the call, but rather return a method handle via the instance of ServiceCall. The reason behind this approach is to allows function composition in order to achieve a processing pipeline where authentication, authorization, logging, and exception handling can easily be added.

Let's move the focus back to ServiceCall class. From the definition presented ...

Get Programming Kotlin now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.