You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The user is then exposed to fewer concepts. There is no concept of delegates nor is the Scala API leaked to the Java code. The user only needs to define the router on the buildRouter method.
The text was updated successfully, but these errors were encountered:
This came to the surface while documenting
Additional Routers
in Lagom.It's not easy to encode a Router using the RoutingDsl and have a specific type that we can later use in Lagom.
For instance, Lagom has the following API to add Additional Routers:
Where
additionalRouter
expects aplay.api.routing.Router
.If we want to encode a router for it, we need to write:
Of course, there are other means of doing that, but none are less verbose than this.
One possible solution is to add an abstract class that removes most of the boiler-plate.
The user implementation will look like:
The user is then exposed to fewer concepts. There is no concept of delegates nor is the Scala API leaked to the Java code. The user only needs to define the router on the
buildRouter
method.The text was updated successfully, but these errors were encountered: