Package play
Class ContextBasedBuiltInComponents
- Object
-
- play.ContextBasedBuiltInComponents
-
- All Implemented Interfaces:
BuiltInComponents
,AkkaComponents
,AkkaTypedComponents
,ApplicationComponents
,BaseComponents
,BodyParserComponents
,ConfigurationComponents
,CryptoComponents
,FileMimeTypesComponents
,HttpComponents
,HttpConfigurationComponents
,HttpErrorHandlerComponents
,TemporaryFileComponents
,I18nComponents
- Direct Known Subclasses:
BuiltInComponentsFromContext
public abstract class ContextBasedBuiltInComponents extends Object implements BuiltInComponents
This helper class provides all the built-in component dependencies by trading them for a single dependency - the application loader context.
-
-
Constructor Summary
Constructors Constructor Description ContextBasedBuiltInComponents()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description ActorSystem
actorSystem()
Application
application()
ApplicationLifecycle
applicationLifecycle()
com.typesafe.config.Config
config()
abstract ApplicationLoader.Context
context()
Returns the application loader context.CookieSigner
cookieSigner()
CoordinatedShutdown
coordinatedShutdown()
CSRFTokenSigner
csrfTokenSigner()
Optional<play.api.ApplicationLoader.DevContext>
devContext()
Helper to interact with the Play build environment.Environment
environment()
The application environment.FileMimeTypes
fileMimeTypes()
HttpErrorHandler
httpErrorHandler()
HttpRequestHandler
httpRequestHandler()
MappedJavaHandlerComponents
javaHandlerComponents()
Langs
langs()
Optional<play.core.SourceMapper>
sourceMapper()
Files.TemporaryFileCreator
tempFileCreator()
play.core.WebCommands
webCommands()
Commands that intercept requests before the rest of the application handles them.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface play.components.AkkaComponents
executionContext, materializer
-
Methods inherited from interface play.components.AkkaTypedComponents
scheduler
-
Methods inherited from interface play.components.BaseComponents
router
-
Methods inherited from interface play.components.BodyParserComponents
anyContentBodyParser, bytesBodyParser, defaultBodyParser, defaultScalaBodyParser, emptyBodyParser, formUrlEncodedBodyParser, jsonBodyParser, multipartFormDataBodyParser, rawBodyParser, scalaBodyParsers, textBodyParser, tolerantJsonBodyParser, tolerantTextBodyParser, tolerantXmlBodyParser, xmlBodyParser
-
Methods inherited from interface play.BuiltInComponents
actionCreator, httpConfiguration, javaContextComponents, messagesApi
-
Methods inherited from interface play.components.ConfigurationComponents
configuration
-
Methods inherited from interface play.components.CryptoComponents
clock
-
Methods inherited from interface play.components.HttpComponents
httpFilters
-
Methods inherited from interface play.components.HttpConfigurationComponents
sessionConfiguration
-
Methods inherited from interface play.components.HttpErrorHandlerComponents
scalaHttpErrorHandler
-
-
-
-
Method Detail
-
context
public abstract ApplicationLoader.Context context()
Returns the application loader context. The implementation should return a stable, effectively singleton value.
-
config
public com.typesafe.config.Config config()
- Specified by:
config
in interfaceConfigurationComponents
-
environment
public Environment environment()
Description copied from interface:BaseComponents
The application environment.- Specified by:
environment
in interfaceBaseComponents
- Returns:
- an instance of the application environment
-
sourceMapper
public Optional<play.core.SourceMapper> sourceMapper()
- Specified by:
sourceMapper
in interfaceBaseComponents
-
devContext
public Optional<play.api.ApplicationLoader.DevContext> devContext()
Description copied from interface:BuiltInComponents
Helper to interact with the Play build environment. Only available in dev mode.- Specified by:
devContext
in interfaceBuiltInComponents
-
applicationLifecycle
public ApplicationLifecycle applicationLifecycle()
- Specified by:
applicationLifecycle
in interfaceBaseComponents
-
webCommands
public play.core.WebCommands webCommands()
Description copied from interface:BuiltInComponents
Commands that intercept requests before the rest of the application handles them. Used by Evolutions.- Specified by:
webCommands
in interfaceBuiltInComponents
- Returns:
- the application web commands.
-
application
public Application application()
- Specified by:
application
in interfaceApplicationComponents
-
langs
public Langs langs()
- Specified by:
langs
in interfaceI18nComponents
- Returns:
- an instance of Langs.
-
fileMimeTypes
public FileMimeTypes fileMimeTypes()
- Specified by:
fileMimeTypes
in interfaceFileMimeTypesComponents
-
javaHandlerComponents
public MappedJavaHandlerComponents javaHandlerComponents()
- Specified by:
javaHandlerComponents
in interfaceHttpComponents
-
httpErrorHandler
public HttpErrorHandler httpErrorHandler()
- Specified by:
httpErrorHandler
in interfaceHttpErrorHandlerComponents
-
httpRequestHandler
public HttpRequestHandler httpRequestHandler()
- Specified by:
httpRequestHandler
in interfaceHttpComponents
-
actorSystem
public ActorSystem actorSystem()
- Specified by:
actorSystem
in interfaceAkkaComponents
- Specified by:
actorSystem
in interfaceAkkaTypedComponents
-
coordinatedShutdown
public CoordinatedShutdown coordinatedShutdown()
- Specified by:
coordinatedShutdown
in interfaceAkkaComponents
-
cookieSigner
public CookieSigner cookieSigner()
- Specified by:
cookieSigner
in interfaceCryptoComponents
-
csrfTokenSigner
public CSRFTokenSigner csrfTokenSigner()
- Specified by:
csrfTokenSigner
in interfaceCryptoComponents
-
tempFileCreator
public Files.TemporaryFileCreator tempFileCreator()
- Specified by:
tempFileCreator
in interfaceTemporaryFileComponents
-
-