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
Action
andBodyParser
must 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 ActionCreator
actionCreator()
<A extends Action<?>>
MappedJavaHandlerComponentsaddAction(Class<A> clazz, Supplier<A> actionSupplier)
<B extends BodyParser<?>>
MappedJavaHandlerComponentsaddBodyParser(Class<B> clazz, Supplier<B> bodyParserSupplier)
play.core.j.JavaContextComponents
contextComponents()
Deprecated.scala.concurrent.ExecutionContext
executionContext()
<A extends Action<?>>
AgetAction(Class<A> actionClass)
<A extends BodyParser<?>>
AgetBodyParser(Class<A> parserClass)
play.api.http.HttpConfiguration
httpConfiguration()
-
-
-
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:
getBodyParser
in interfaceplay.core.j.JavaHandlerComponents
-
getAction
public <A extends Action<?>> A getAction(Class<A> actionClass)
- Specified by:
getAction
in interfaceplay.core.j.JavaHandlerComponents
-
actionCreator
public ActionCreator actionCreator()
- Specified by:
actionCreator
in interfaceplay.core.j.JavaHandlerComponents
-
httpConfiguration
public play.api.http.HttpConfiguration httpConfiguration()
- Specified by:
httpConfiguration
in interfaceplay.core.j.JavaHandlerComponents
-
executionContext
public scala.concurrent.ExecutionContext executionContext()
- Specified by:
executionContext
in interfaceplay.core.j.JavaHandlerComponents
-
contextComponents
@Deprecated public play.core.j.JavaContextComponents contextComponents()
Deprecated.- Specified by:
contextComponents
in 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)
-
-