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 |
---|---|
static ApplicationLoader.Context |
create(Environment environment)
Create an application loading context.
|
static ApplicationLoader.Context |
create(Environment environment,
java.util.Map<java.lang.String,java.lang.Object> initialSettings)
Create an application loading context.
|
Environment |
environment()
Get the environment from the context.
|
Configuration |
initialConfiguration()
Get the configuration from the context.
|
play.api.ApplicationLoader.Context |
underlying()
Get the wrapped Scala context.
|
ApplicationLoader.Context |
withConfiguration(Configuration initialConfiguration)
Create a new context with a different configuration.
|
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.public play.api.ApplicationLoader.Context underlying()
public Environment environment()
public Configuration initialConfiguration()
public ApplicationLoader.Context withEnvironment(Environment environment)
environment
- the environment this context should usepublic ApplicationLoader.Context withConfiguration(Configuration initialConfiguration)
initialConfiguration
- the configuration to use in the created contextpublic static ApplicationLoader.Context create(Environment environment, java.util.Map<java.lang.String,java.lang.Object> initialSettings)
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.public static ApplicationLoader.Context create(Environment environment)
environment
- The application environment.