Class

com.lightbend.lagom.scaladsl.server

LagomApplication

Related Doc: package server

Permalink

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

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
Linear Supertypes
LagomServiceClientComponents, TopicFactoryProvider, LagomServerComponents, MetricsServiceComponents, ProvidesJsonSerializerRegistry, ProvidesAdditionalConfiguration, BuiltInComponentsFromContext, BuiltInComponents, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. LagomApplication
  2. LagomServiceClientComponents
  3. TopicFactoryProvider
  4. LagomServerComponents
  5. MetricsServiceComponents
  6. ProvidesJsonSerializerRegistry
  7. ProvidesAdditionalConfiguration
  8. BuiltInComponentsFromContext
  9. BuiltInComponents
  10. AnyRef
  11. 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)

    Permalink

    context

    The application context.

Abstract Value Members

  1. abstract def lagomServer: LagomServer

    Permalink
    Definition Classes
    LagomServerComponents
  2. abstract def serviceLocator: ServiceLocator

    Permalink
    Definition Classes
    LagomServiceClientComponents
  3. abstract def wsClient: WSClient

    Permalink
    Definition Classes
    LagomServiceClientComponents

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String

    Permalink
    Implicit information
    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)

    Permalink
    Implicit information
    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

    Permalink
    Definition Classes
    AnyRef → Any
  6. lazy val actorSystem: ActorSystem

    Permalink
    Definition Classes
    LagomApplicationLagomServiceClientComponentsMetricsServiceComponents → BuiltInComponents
  7. def additionalConfiguration: AdditionalConfiguration

    Permalink

    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
  8. lazy val aesCrypter: AESCrypter

    Permalink
    Definition Classes
    BuiltInComponents
  9. lazy val application: Application

    Permalink
    Definition Classes
    BuiltInComponents
  10. lazy val applicationLifecycle: DefaultApplicationLifecycle

    Permalink
    Definition Classes
    BuiltInComponentsFromContext → BuiltInComponents
  11. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  12. macro def bindService[T <: Service]: LagomServiceBinder[T]

    Permalink
    Attributes
    protected
    Definition Classes
    LagomServerComponents
  13. lazy val circuitBreakerMetricsProvider: CircuitBreakerMetricsProvider

    Permalink
    Definition Classes
    LagomServiceClientComponents
  14. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  15. lazy val configuration: Configuration

    Permalink
    Definition Classes
    LagomApplication → BuiltInComponentsFromContext → BuiltInComponents
  16. lazy val cookieSigner: CookieSigner

    Permalink
    Definition Classes
    BuiltInComponents
  17. lazy val crypto: Crypto

    Permalink
    Definition Classes
    BuiltInComponents
  18. lazy val cryptoConfig: CryptoConfig

    Permalink
    Definition Classes
    BuiltInComponents
  19. lazy val csrfTokenSigner: CSRFTokenSigner

    Permalink
    Definition Classes
    BuiltInComponents
  20. lazy val defaultExceptionSerializer: ExceptionSerializer

    Permalink
    Definition Classes
    LagomServiceClientComponents
  21. def ensuring(cond: (LagomApplication) ⇒ Boolean, msg: ⇒ Any): LagomApplication

    Permalink
    Implicit information
    This member is added by an implicit conversion from LagomApplication to Ensuring[LagomApplication] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  22. def ensuring(cond: (LagomApplication) ⇒ Boolean): LagomApplication

    Permalink
    Implicit information
    This member is added by an implicit conversion from LagomApplication to Ensuring[LagomApplication] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  23. def ensuring(cond: Boolean, msg: ⇒ Any): LagomApplication

    Permalink
    Implicit information
    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: Boolean): LagomApplication

    Permalink
    Implicit information
    This member is added by an implicit conversion from LagomApplication to Ensuring[LagomApplication] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  25. lazy val environment: Environment

    Permalink
    Definition Classes
    BuiltInComponentsFromContext → BuiltInComponents
  26. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  27. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  28. implicit lazy val executionContext: ExecutionContext

    Permalink
  29. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  30. def formatted(fmtstr: String): String

    Permalink
    Implicit information
    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()
  31. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  32. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  33. lazy val httpConfiguration: HttpConfiguration

    Permalink
    Definition Classes
    BuiltInComponents
  34. lazy val httpErrorHandler: HttpErrorHandler

    Permalink
    Definition Classes
    BuiltInComponents
  35. lazy val httpFilters: Seq[EssentialFilter]

    Permalink
    Definition Classes
    BuiltInComponents
  36. lazy val httpRequestHandler: HttpRequestHandler

    Permalink
    Definition Classes
    BuiltInComponents
  37. lazy val injector: Injector

    Permalink
    Definition Classes
    BuiltInComponents
  38. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  39. lazy val lagomServerBuilder: LagomServerBuilder

    Permalink
  40. implicit lazy val materializer: Materializer

    Permalink
    Definition Classes
    BuiltInComponents
  41. lazy val metricsServiceBinding: LagomServiceBinding[MetricsService]

    Permalink
    Definition Classes
    MetricsServiceComponents
  42. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  43. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  44. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  45. def optionalJsonSerializerRegistry: Option[JsonSerializerRegistry]

    Permalink

    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
  46. def optionalTopicFactory: Option[TopicFactory]

    Permalink
    Definition Classes
    TopicFactoryProvider
  47. lazy val router: Router

    Permalink
    Definition Classes
    LagomServerComponents
  48. lazy val scaladslWebSocketClient: ScaladslWebSocketClient

    Permalink
    Definition Classes
    LagomServiceClientComponents
  49. macro def serverFor[T <: Service](serviceFactory: ⇒ T): LagomServer

    Permalink

    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
  50. lazy val serviceClient: ServiceClient

    Permalink
    Definition Classes
    LagomServiceClientComponents
  51. lazy val serviceInfo: ServiceInfo

    Permalink
    Definition Classes
    LagomServerComponents
  52. lazy val serviceResolver: ServiceResolver

    Permalink
    Definition Classes
    LagomServiceClientComponents
  53. lazy val sourceMapper: Option[SourceMapper]

    Permalink
    Definition Classes
    BuiltInComponentsFromContext → BuiltInComponents
  54. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  55. lazy val tempFileCreator: TemporaryFileCreator

    Permalink
    Definition Classes
    BuiltInComponents
  56. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  57. def topicPublisherName: Option[String]

    Permalink

    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
  58. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  59. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  60. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  61. lazy val webCommands: WebCommands

    Permalink
    Definition Classes
    BuiltInComponentsFromContext → BuiltInComponents
  62. def [B](y: B): (LagomApplication, B)

    Permalink
    Implicit information
    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. lazy val global: Deprecated

    Permalink
    Definition Classes
    BuiltInComponents
    Annotations
    @deprecated
    Deprecated

    (Since version 2.5.x) Use dependency injection

Inherited from TopicFactoryProvider

Inherited from LagomServerComponents

Inherited from MetricsServiceComponents

Inherited from BuiltInComponentsFromContext

Inherited from BuiltInComponents

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