The application context.
Define the additional configuration to add to the application.
Define the additional configuration to add to the application.
Classes that override this must combine the configuration they add with the configuration from the super implementation. Failure to do this will prevent different integrations from working with each other.
When overriding, the overridden file should be a def, so as to ensure multiple components can all override it. Lagom will only invoke this method once from a lazy val, so it will effectively be calculated once.
The optionally provided serializer registry.
The optionally provided serializer registry.
Note that this can also be exploited to allow multiple traits to contribute to the serializer registry rather than provide one, by checking whether the super implementation also provides one, and concatenating with that if it does. To do that, the override must be a def, so that it can be subsequently overridden by other mixed in traits.
Bind a server for the given service and factory for the service.
Bind a server for the given service and factory for the service.
Note, the type parameter for this method should always be passed explicitly, as the macro needs it to know what the trait for the service descriptor should be.
The name of the topic publisher.
The name of the topic publisher.
Since topic publishers don't actually provide any components, they just consume a LagomServer and publish the topics they find there, this can be used to signal that a topic publisher has been provided to publish topics, so that the LagomServerComponents can detect a misconfiguration where one hasn't been provided.
The name of the topic publisher that has published topics, if one has been provided.
A Lagom application.
A Lagom service should subclass this in order to wire together a Lagom application.
This includes the Lagom server components (which builds and provides the Lagom router) as well as the Lagom service client components (which allows implementing Lagom service clients from Lagom service descriptors).
There are two abstract defs that must be implemented, one is LagomServerComponents.lagomServer, the other is LagomServiceClientComponents.serviceLocator. Typically, the
lagomServer
component will be implemented by an abstract subclass of this class, and will bind all the services that this Lagom application provides. Meanwhile, theserviceLocator
component will be provided by mixing in a service locator components trait in LagomApplicationLoader, which trait is mixed in will vary depending on whether the application is being loaded for production or for development.