c

com.lightbend.lagom.scaladsl.server

LagomApplication

abstract class LagomApplication extends BuiltInComponentsFromContext with ProvidesAdditionalConfiguration with ProvidesJsonSerializerRegistry with LagomServerComponents with LagomServiceClientComponents with LagomConfigComponent with AkkaManagementComponents

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.

Source
LagomApplicationLoader.scala
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. LagomApplication
  2. AkkaManagementComponents
  3. LagomConfigComponent
  4. LagomServiceClientComponents
  5. TopicFactoryProvider
  6. LagomServerComponents
  7. MetricsServiceComponents
  8. ProvidesJsonSerializerRegistry
  9. ProvidesAdditionalConfiguration
  10. BuiltInComponentsFromContext
  11. BuiltInComponents
  12. AkkaTypedComponents
  13. AkkaComponents
  14. I18nComponents
  15. AnyRef
  16. 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 LagomApplication(context: LagomApplicationContext)

    context

    The application context.

Abstract Value Members

  1. abstract def lagomServer: LagomServer
    Definition Classes
    LagomServerComponents
  2. abstract def serviceLocator: ServiceLocator
    Definition Classes
    LagomServiceClientComponents
  3. abstract def wsClient: WSClient
    Definition Classes
    LagomServiceClientComponents

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String
    Implicit
    This member is added by an implicit conversion from LagomApplication to any2stringadd[LagomApplication] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (LagomApplication, B)
    Implicit
    This member is added by an implicit conversion from LagomApplication to ArrowAssoc[LagomApplication] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. def Action: DefaultActionBuilder
    Attributes
    protected
    Definition Classes
    BuiltInComponents
  7. lazy val actorSystem: ActorSystem
    Definition Classes
    LagomApplicationAkkaManagementComponentsLagomServiceClientComponentsMetricsServiceComponents → AkkaTypedComponents → AkkaComponents
  8. def additionalConfiguration: AdditionalConfiguration

    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.

    Definition Classes
    ProvidesAdditionalConfiguration
  9. lazy val application: Application
    Definition Classes
    BuiltInComponents
  10. def applicationLifecycle: ApplicationLifecycle
    Definition Classes
    BuiltInComponentsFromContext → BuiltInComponents → AkkaComponents
  11. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  12. lazy val circuitBreakerMetricsProvider: CircuitBreakerMetricsProvider
    Definition Classes
    LagomServiceClientComponents
  13. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  14. def config: Config
    Definition Classes
    LagomConfigComponent
  15. lazy val controllerComponents: ControllerComponents
    Definition Classes
    BuiltInComponentsFromContext
  16. lazy val cookieSigner: CookieSigner
    Definition Classes
    BuiltInComponents
  17. lazy val coordinatedShutdown: CoordinatedShutdown
    Definition Classes
    AkkaComponents
  18. lazy val csrfTokenSigner: CSRFTokenSigner
    Definition Classes
    BuiltInComponents
  19. lazy val defaultActionBuilder: DefaultActionBuilder
    Definition Classes
    BuiltInComponents
  20. lazy val defaultBodyParser: BodyParser[AnyContent]
    Definition Classes
    BuiltInComponents
  21. lazy val defaultExceptionSerializer: ExceptionSerializer
    Definition Classes
    LagomServiceClientComponents
  22. def devContext: Option[DevContext]
    Definition Classes
    BuiltInComponentsFromContext → BuiltInComponents
  23. def ensuring(cond: (LagomApplication) ⇒ Boolean, msg: ⇒ Any): LagomApplication
    Implicit
    This member is added by an implicit conversion from LagomApplication to Ensuring[LagomApplication] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  24. def ensuring(cond: (LagomApplication) ⇒ Boolean): LagomApplication
    Implicit
    This member is added by an implicit conversion from LagomApplication to Ensuring[LagomApplication] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  25. def ensuring(cond: Boolean, msg: ⇒ Any): LagomApplication
    Implicit
    This member is added by an implicit conversion from LagomApplication to Ensuring[LagomApplication] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  26. def ensuring(cond: Boolean): LagomApplication
    Implicit
    This member is added by an implicit conversion from LagomApplication to Ensuring[LagomApplication] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  27. def environment: Environment
    Definition Classes
    BuiltInComponentsFromContext → BuiltInComponents → AkkaComponents → I18nComponents
  28. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  29. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  30. implicit lazy val executionContext: ExecutionContext
    Definition Classes
    AkkaComponents
  31. lazy val fileMimeTypes: FileMimeTypes
    Definition Classes
    BuiltInComponents
  32. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  33. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from LagomApplication to StringFormat[LagomApplication] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  34. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  35. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  36. lazy val httpConfiguration: HttpConfiguration
    Definition Classes
    BuiltInComponents → I18nComponents
  37. lazy val httpErrorHandler: HttpErrorHandler
    Definition Classes
    BuiltInComponents
  38. val httpFilters: Seq[EssentialFilter]
    Definition Classes
    LagomApplication → BuiltInComponents
  39. lazy val httpRequestHandler: HttpRequestHandler
    Definition Classes
    BuiltInComponents
  40. lazy val injector: Injector
    Definition Classes
    BuiltInComponents
  41. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  42. lazy val lagomServerBuilder: LagomServerBuilder
  43. lazy val langs: Langs
    Definition Classes
    I18nComponents
  44. implicit lazy val materializer: Materializer
    Definition Classes
    AkkaComponents
  45. lazy val messagesApi: MessagesApi
    Definition Classes
    I18nComponents
  46. lazy val metricsServiceBinding: LagomServiceBinding[MetricsService]
    Definition Classes
    MetricsServiceComponents
  47. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  48. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  49. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  50. def optionalJsonSerializerRegistry: Option[JsonSerializerRegistry]

    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.

    Definition Classes
    ProvidesJsonSerializerRegistry
  51. def optionalTopicFactory: Option[TopicFactory]
    Definition Classes
    TopicFactoryProvider
  52. def parse: PlayBodyParsers
    Attributes
    protected
    Definition Classes
    BuiltInComponents
  53. lazy val playBodyParsers: PlayBodyParsers
    Definition Classes
    BuiltInComponents
  54. lazy val requestFactory: RequestFactory
    Definition Classes
    BuiltInComponents
  55. lazy val router: Router
    Definition Classes
    LagomServerComponents
  56. lazy val scaladslWebSocketClient: ScaladslWebSocketClient
    Definition Classes
    LagomServiceClientComponents
  57. implicit lazy val scheduler: Scheduler
    Definition Classes
    AkkaTypedComponents
  58. macro def serverFor[T <: Service](serviceFactory: ⇒ T): LagomServer

    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.

    Attributes
    protected
    Definition Classes
    LagomServerComponents
  59. lazy val serviceClient: ServiceClient
    Definition Classes
    LagomServiceClientComponents
  60. lazy val serviceInfo: ServiceInfo
    Definition Classes
    LagomServerComponents
  61. lazy val serviceResolver: ServiceResolver
    Definition Classes
    LagomServiceClientComponents
  62. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  63. lazy val tempFileCreator: TemporaryFileCreator
    Definition Classes
    BuiltInComponents
  64. lazy val tempFileReaper: TemporaryFileReaper
    Definition Classes
    BuiltInComponents
  65. def toString(): String
    Definition Classes
    AnyRef → Any
  66. def topicPublisherName: Option[String]

    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.

    returns

    The name of the topic publisher that has published topics, if one has been provided.

    Definition Classes
    TopicFactoryProvider
  67. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  68. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  69. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  70. def webCommands: WebCommands
    Definition Classes
    BuiltInComponents
  71. def [B](y: B): (LagomApplication, B)
    Implicit
    This member is added by an implicit conversion from LagomApplication to ArrowAssoc[LagomApplication] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Deprecated Value Members

  1. macro def bindService[T <: Service]: LagomServiceBinder[T]
    Attributes
    protected
    Definition Classes
    LagomServerComponents
    Annotations
    @deprecated
    Deprecated

    (Since version 1.5.0) Use LagomServerComponents#serverFor instead

  2. lazy val configuration: Configuration
    Definition Classes
    LagomApplicationAkkaManagementComponentsLagomConfigComponent → BuiltInComponentsFromContext → BuiltInComponents → AkkaComponents → I18nComponents
    Annotations
    @deprecated
    Deprecated

    (Since version 1.4.0) prefer config using typesafe Config instead

  3. lazy val javaContextComponents: JavaContextComponents
    Definition Classes
    BuiltInComponents
    Annotations
    @deprecated
    Deprecated

    (Since version 2.8.0) Use the corresponding methods that provide MessagesApi, Langs, FileMimeTypes or HttpConfiguration

  4. def sourceMapper: Option[SourceMapper]
    Definition Classes
    BuiltInComponents
    Annotations
    @deprecated
    Deprecated

    (Since version 2.7.0) Use devContext.map(_.sourceMapper) instead

Inherited from AkkaManagementComponents

Inherited from LagomConfigComponent

Inherited from TopicFactoryProvider

Inherited from LagomServerComponents

Inherited from MetricsServiceComponents

Inherited from BuiltInComponents

Inherited from AkkaTypedComponents

Inherited from AkkaComponents

Inherited from I18nComponents

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from LagomApplication to any2stringadd[LagomApplication]

Inherited by implicit conversion StringFormat from LagomApplication to StringFormat[LagomApplication]

Inherited by implicit conversion Ensuring from LagomApplication to Ensuring[LagomApplication]

Inherited by implicit conversion ArrowAssoc from LagomApplication to ArrowAssoc[LagomApplication]

Ungrouped