Package play.core.j
Class MappedJavaHandlerComponents
- Object
-
- play.core.j.MappedJavaHandlerComponents
-
- All Implemented Interfaces:
play.core.j.JavaHandlerComponents
public class MappedJavaHandlerComponents extends Object implements play.core.j.JavaHandlerComponents
The components necessary to handle a Java handler.But this implementation does not uses an Injector. Instead, the necessary
ActionandBodyParsermust be added here manually. This is way we avoid mixing runtime dependency injector components with compile time injected ones.
-
-
Constructor Summary
Constructors Constructor Description MappedJavaHandlerComponents(ActionCreator actionCreator, play.api.http.HttpConfiguration httpConfiguration, scala.concurrent.ExecutionContext executionContext)MappedJavaHandlerComponents(ActionCreator actionCreator, play.api.http.HttpConfiguration httpConfiguration, scala.concurrent.ExecutionContext executionContext, play.core.j.JavaContextComponents contextComponents)Deprecated.Deprecated as of 2.8.0.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ActionCreatoractionCreator()<A extends Action<?>>
MappedJavaHandlerComponentsaddAction(Class<A> clazz, Supplier<A> actionSupplier)<B extends BodyParser<?>>
MappedJavaHandlerComponentsaddBodyParser(Class<B> clazz, Supplier<B> bodyParserSupplier)play.core.j.JavaContextComponentscontextComponents()Deprecated.scala.concurrent.ExecutionContextexecutionContext()<A extends Action<?>>
AgetAction(Class<A> actionClass)<A extends BodyParser<?>>
AgetBodyParser(Class<A> parserClass)play.api.http.HttpConfigurationhttpConfiguration()
-
-
-
Constructor Detail
-
MappedJavaHandlerComponents
public MappedJavaHandlerComponents(ActionCreator actionCreator, play.api.http.HttpConfiguration httpConfiguration, scala.concurrent.ExecutionContext executionContext)
-
MappedJavaHandlerComponents
@Deprecated public MappedJavaHandlerComponents(ActionCreator actionCreator, play.api.http.HttpConfiguration httpConfiguration, scala.concurrent.ExecutionContext executionContext, play.core.j.JavaContextComponents contextComponents)
Deprecated.Deprecated as of 2.8.0. Use constructor without JavaContextComponents
-
-
Method Detail
-
getBodyParser
public <A extends BodyParser<?>> A getBodyParser(Class<A> parserClass)
- Specified by:
getBodyParserin interfaceplay.core.j.JavaHandlerComponents
-
getAction
public <A extends Action<?>> A getAction(Class<A> actionClass)
- Specified by:
getActionin interfaceplay.core.j.JavaHandlerComponents
-
actionCreator
public ActionCreator actionCreator()
- Specified by:
actionCreatorin interfaceplay.core.j.JavaHandlerComponents
-
httpConfiguration
public play.api.http.HttpConfiguration httpConfiguration()
- Specified by:
httpConfigurationin interfaceplay.core.j.JavaHandlerComponents
-
executionContext
public scala.concurrent.ExecutionContext executionContext()
- Specified by:
executionContextin interfaceplay.core.j.JavaHandlerComponents
-
contextComponents
@Deprecated public play.core.j.JavaContextComponents contextComponents()
Deprecated.- Specified by:
contextComponentsin interfaceplay.core.j.JavaHandlerComponents
-
addAction
public <A extends Action<?>> MappedJavaHandlerComponents addAction(Class<A> clazz, Supplier<A> actionSupplier)
-
addBodyParser
public <B extends BodyParser<?>> MappedJavaHandlerComponents addBodyParser(Class<B> clazz, Supplier<B> bodyParserSupplier)
-
-