Package play

Class DefaultApplication

  • All Implemented Interfaces:
    Application

    @Singleton
    public class DefaultApplication
    extends Object
    implements Application
    Default implementation of a Play Application.

    Application creation is handled by the framework engine.

    • Constructor Detail

      • DefaultApplication

        @Inject
        public DefaultApplication​(play.api.Application application,
                                  com.typesafe.config.Config config,
                                  Injector injector,
                                  Environment environment)
        Create an application that wraps a Scala application.
        Parameters:
        application - the application to wrap
        config - the new application's configuration
        injector - the new application's injector
      • DefaultApplication

        public DefaultApplication​(play.api.Application application,
                                  Injector injector)
        Create an application that wraps a Scala application.
        Parameters:
        application - the application to wrap
        injector - the new application's injector
    • Method Detail

      • getWrappedApplication

        @Deprecated
        public play.api.Application getWrappedApplication()
        Deprecated.
        Get the underlying Scala application.
        Specified by:
        getWrappedApplication in interface Application
        Returns:
        the underlying application
        See Also:
        method
      • asScala

        public play.api.Application asScala()
        Get the application as a Scala application.
        Specified by:
        asScala in interface Application
        Returns:
        this application as a Scala application.
        See Also:
        Application
      • config

        public com.typesafe.config.Config config()
        Get the application configuration.
        Specified by:
        config in interface Application
        Returns:
        the configuration
      • injector

        public Injector injector()
        Get the injector for this application.
        Specified by:
        injector in interface Application
        Returns:
        the injector