Package play
Class ContextBasedBuiltInComponents
- Object
-
- play.ContextBasedBuiltInComponents
-
- All Implemented Interfaces:
BuiltInComponents,ApplicationComponents,BaseComponents,BodyParserComponents,ConfigurationComponents,CryptoComponents,FileMimeTypesComponents,HttpComponents,HttpConfigurationComponents,HttpErrorHandlerComponents,PekkoComponents,PekkoTypedComponents,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 ActorSystemactorSystem()Applicationapplication()ApplicationLifecycleapplicationLifecycle()com.typesafe.config.Configconfig()abstract ApplicationLoader.Contextcontext()Returns the application loader context.CookieSignercookieSigner()CoordinatedShutdowncoordinatedShutdown()CSRFTokenSignercsrfTokenSigner()Optional<play.api.ApplicationLoader.DevContext>devContext()Helper to interact with the Play build environment.Environmentenvironment()The application environment.FileMimeTypesfileMimeTypes()HttpErrorHandlerhttpErrorHandler()HttpRequestHandlerhttpRequestHandler()MappedJavaHandlerComponentsjavaHandlerComponents()Langslangs()Optional<play.core.SourceMapper>sourceMapper()Files.TemporaryFileCreatortempFileCreator()play.core.WebCommandswebCommands()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.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
-
Methods inherited from interface play.components.PekkoComponents
executionContext, materializer
-
Methods inherited from interface play.components.PekkoTypedComponents
scheduler
-
-
-
-
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:
configin interfaceConfigurationComponents
-
environment
public Environment environment()
Description copied from interface:BaseComponentsThe application environment.- Specified by:
environmentin interfaceBaseComponents- Returns:
- an instance of the application environment
-
sourceMapper
public Optional<play.core.SourceMapper> sourceMapper()
- Specified by:
sourceMapperin interfaceBaseComponents
-
devContext
public Optional<play.api.ApplicationLoader.DevContext> devContext()
Description copied from interface:BuiltInComponentsHelper to interact with the Play build environment. Only available in dev mode.- Specified by:
devContextin interfaceBuiltInComponents
-
applicationLifecycle
public ApplicationLifecycle applicationLifecycle()
- Specified by:
applicationLifecyclein interfaceBaseComponents
-
webCommands
public play.core.WebCommands webCommands()
Description copied from interface:BuiltInComponentsCommands that intercept requests before the rest of the application handles them. Used by Evolutions.- Specified by:
webCommandsin interfaceBuiltInComponents- Returns:
- the application web commands.
-
application
public Application application()
- Specified by:
applicationin interfaceApplicationComponents
-
langs
public Langs langs()
- Specified by:
langsin interfaceI18nComponents- Returns:
- an instance of Langs.
-
fileMimeTypes
public FileMimeTypes fileMimeTypes()
- Specified by:
fileMimeTypesin interfaceFileMimeTypesComponents
-
javaHandlerComponents
public MappedJavaHandlerComponents javaHandlerComponents()
- Specified by:
javaHandlerComponentsin interfaceHttpComponents
-
httpErrorHandler
public HttpErrorHandler httpErrorHandler()
- Specified by:
httpErrorHandlerin interfaceHttpErrorHandlerComponents
-
httpRequestHandler
public HttpRequestHandler httpRequestHandler()
- Specified by:
httpRequestHandlerin interfaceHttpComponents
-
actorSystem
public ActorSystem actorSystem()
- Specified by:
actorSystemin interfacePekkoComponents- Specified by:
actorSystemin interfacePekkoTypedComponents
-
coordinatedShutdown
public CoordinatedShutdown coordinatedShutdown()
- Specified by:
coordinatedShutdownin interfacePekkoComponents
-
cookieSigner
public CookieSigner cookieSigner()
- Specified by:
cookieSignerin interfaceCryptoComponents
-
csrfTokenSigner
public CSRFTokenSigner csrfTokenSigner()
- Specified by:
csrfTokenSignerin interfaceCryptoComponents
-
tempFileCreator
public Files.TemporaryFileCreator tempFileCreator()
- Specified by:
tempFileCreatorin interfaceTemporaryFileComponents
-
-