c

com.lightbend.lagom.scaladsl.server

LagomApplicationLoader

abstract class LagomApplicationLoader extends ApplicationLoader with ServiceDiscovery

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.

Source
LagomApplicationLoader.scala
Linear Supertypes
ServiceDiscovery, ApplicationLoader, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. LagomApplicationLoader
  2. ServiceDiscovery
  3. ApplicationLoader
  4. AnyRef
  5. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new LagomApplicationLoader()

Abstract Value Members

  1. abstract def load(context: LagomApplicationContext): LagomApplication

    Load a Lagom application for production.

    Load a Lagom application for production.

    This should mix in a production service locator implementation, and anything else specific to production, to an application provided subclass of LagomApplication. It will be invoked to load the application in production.

    context

    The Lagom application context.

    returns

    A Lagom application.

Concrete Value Members

  1. def describeService: Option[Descriptor]

    Implement this to allow tooling, such as Lightbend Orchestration, to discover the service (if any) offered by this application.

    Implement this to allow tooling, such as Lightbend Orchestration, to discover the service (if any) offered by this application.

    This will be used to generate configuration regarding ACLs and service name for production deployment.

    For example:

    override def describeService = Some(readDescriptor[MyService])

  2. final def discoverServices(classLoader: ClassLoader): List[ServiceDescription]
    Definition Classes
    LagomApplicationLoader → ServiceDiscovery
  3. final def load(context: Context): Application

    Implementation of Play's load method.

    Implementation of Play's load method.

    Since Lagom applications need to use a different wiring in dev mode, using the dev mode service locator and registry, to what they use in prod, this separates the two possibilities out, invoking the load() method for prod, and the loadDevMode() method for development.

    It also wraps the Play specific types in Lagom types.

    Definition Classes
    LagomApplicationLoader → ApplicationLoader
  4. def loadDevMode(context: LagomApplicationContext): LagomApplication

    Load a Lagom application for development.

    Load a Lagom application for development.

    This should mix in LagomDevModeComponents with an application provided subclass of LagomApplication, such that the service locator used will be the dev mode service locator, and so that services get registered with the dev mode service registry.

    context

    The Lagom application context.

    returns

    A lagom application.

  5. val logger: Logger