public static final class ApplicationLoader.Context
extends java.lang.Object
Constructor and Description |
---|
Context(play.api.ApplicationLoader.Context underlying)
The context for loading an application.
|
Context(Environment environment)
The context for loading an application.
|
Context(Environment environment,
java.util.Map<java.lang.String,java.lang.Object> initialSettings)
The context for loading an application.
|
Modifier and Type | Method and Description |
---|---|
play.api.ApplicationLoader.Context |
asScala()
Get the wrapped Scala context.
|
static ApplicationLoader.Context |
create(Environment environment)
Deprecated.
as of 2.6.0. Use
ApplicationLoader.create(Environment) . |
static ApplicationLoader.Context |
create(Environment environment,
java.util.Map<java.lang.String,java.lang.Object> initialSettings)
Deprecated.
as of 2.6.0. Use
ApplicationLoader.create(Environment, Map) . |
Environment |
environment()
Get the environment from the context.
|
com.typesafe.config.Config |
initialConfig()
Get the configuration from the context.
|
Configuration |
initialConfiguration()
Deprecated.
|
play.api.ApplicationLoader.Context |
underlying()
Deprecated.
As of release 2.6.0. Use
asScala() |
ApplicationLoader.Context |
withConfig(com.typesafe.config.Config initialConfiguration)
Create a new context with a different configuration.
|
ApplicationLoader.Context |
withConfiguration(Configuration initialConfiguration)
Deprecated.
|
ApplicationLoader.Context |
withEnvironment(Environment environment)
Create a new context with a different environment.
|
public Context(play.api.ApplicationLoader.Context underlying)
underlying
- The Scala context that is being wrapped.public Context(Environment environment)
environment
- the application environmentpublic Context(Environment environment, java.util.Map<java.lang.String,java.lang.Object> initialSettings)
environment
- the application environmentinitialSettings
- the initial settings. These settings are merged with the settings from the loaded
configuration files, and together form the initialConfiguration provided by the context. It
is intended for use in dev mode, to allow the build system to pass additional configuration
into the application.@Deprecated public play.api.ApplicationLoader.Context underlying()
asScala()
public play.api.ApplicationLoader.Context asScala()
public Environment environment()
@Deprecated public Configuration initialConfiguration()
public com.typesafe.config.Config initialConfig()
public ApplicationLoader.Context withEnvironment(Environment environment)
environment
- the environment this context should use@Deprecated public ApplicationLoader.Context withConfiguration(Configuration initialConfiguration)
initialConfiguration
- the configuration to use in the created contextpublic ApplicationLoader.Context withConfig(com.typesafe.config.Config initialConfiguration)
initialConfiguration
- the configuration to use in the created context@Deprecated public static ApplicationLoader.Context create(Environment environment, java.util.Map<java.lang.String,java.lang.Object> initialSettings)
ApplicationLoader.create(Environment, Map)
.Locates and loads the necessary configuration files for the application.
environment
- The application environment.initialSettings
- The initial settings. These settings are merged with the settings from the loaded
configuration files, and together form the initialConfiguration provided by the context. It
is intended for use in dev mode, to allow the build system to pass additional configuration
into the application.@Deprecated public static ApplicationLoader.Context create(Environment environment)
ApplicationLoader.create(Environment)
.Locates and loads the necessary configuration files for the application.
environment
- The application environment.