Packages

package server

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. All

Type Members

  1. trait AkkaManagementComponents extends AnyRef
  2. abstract class LagomApplication extends BuiltInComponentsFromContext with ProvidesAdditionalConfiguration with ProvidesJsonSerializerRegistry with LagomServerComponents with LagomServiceClientComponents with LagomConfigComponent with AkkaManagementComponents

    A Lagom application.

    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, the serviceLocator 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.

  3. sealed trait LagomApplicationContext extends AnyRef

    The Lagom application context.

    The Lagom application context.

    This wraps a Play context, but is provided such that if in future Lagom needs to pass other context information to an app, this can be extended without breaking compatibility.

  4. abstract class LagomApplicationLoader extends ApplicationLoader with ServiceDiscovery

    A Play application loader for Lagom.

    A Play application loader for Lagom.

    Scala Lagom applications should provide a subclass of this to create their application, and configure it in their application.conf file using:

    play.application.loader = com.example.MyApplicationLoader

    This class provides an abstraction over Play's application loader that provides Lagom specific functionality.

  5. sealed trait LagomServer extends AnyRef

    A Lagom server

  6. final class LagomServerBuilder extends AnyRef
  7. trait LagomServerComponents extends MetricsServiceComponents
  8. sealed trait LagomServiceBinder[T <: Service] extends AnyRef

    Internal API used by AST generated by the serverFor macro.

  9. sealed trait LagomServiceBinding[T <: Service] extends AnyRef

    Internal API used by AST generated by the serverFor macro.

  10. trait LagomServiceRouter extends Router

    A Lagom service router.

    A Lagom service router.

    This trait doesn't add anything, except that it makes the router created by the LagomServer strongly typed. This allows it to be dependency injected by type, making it simple to use it in combination with the Play routes file.

    For example, if using a custom router, the Lagom router could be routed to from the routes file like this:

    -> / com.lightbend.lagom.scaladsl.server.LagomServiceRouter

  11. trait LocalServiceLocator extends RequiresLagomServicePort with CircuitBreakerComponents

    A service locator that just resolves locally provided services.

    A service locator that just resolves locally provided services.

    This is useful for integration testing a single service, and can be mixed in to a LagomApplication class to provide the local service locator.

  12. trait PlayServiceCall[Request, Response] extends ServiceCall[Request, Response]

    A service call implementation that allows plugging directly into Play's request handling.

  13. trait RequiresLagomServicePort extends AnyRef

    When using dynamic port allocation, a circular dependency may exist if the application needs to know what port it's running on, since the port won't be know until after the server has bound to the listening port (the OS will select a free port at bind time), but we can't bind the server to the listening port until we have an application to service incoming requests.

    When using dynamic port allocation, a circular dependency may exist if the application needs to know what port it's running on, since the port won't be know until after the server has bound to the listening port (the OS will select a free port at bind time), but we can't bind the server to the listening port until we have an application to service incoming requests.

    This trait allows that circular dependency to be resolved, by making the port available as a future, and allowing it to be provided after the application has been created using the RequiresLagomServicePort.provideLagomServicePort() method.

    This is primarily useful for testing, where dynamic port allocation is often used.

  14. trait ServerServiceCall[Request, Response] extends ServiceCall[Request, Response]

    A server implementation of a service call.

    A server implementation of a service call.

    While the server implementation of the service doesn't have to make use of this type, what this type does is it allows the supply and composition of request and response headers. When working with and or composing server service calls, it is almost never a good idea to call #invoke(Object), rather, Object) should be called. Invocation of the former may result in an UnsupportedOperationException being thrown.

    In some cases, where the underlying transport doesn't allow sending a header after the request message has been received (eg WebSockets), the response header may be ignored. In these cases, Lagom will make a best effort attempt at determining whether there was custom information in the response header, and if so, log a warning that it wasn't set.

Value Members

  1. object LagomApplicationContext
  2. object LagomServer
  3. object LagomServiceBinder

    Internal API used by AST generated by the serverFor macro.

  4. object PlayServiceCall
  5. object ServerServiceCall

Ungrouped