@FunctionalInterface public interface PlayServiceCall<Request,Response> extends ServiceCall<Request,Response>
Modifier and Type | Method and Description |
---|---|
play.mvc.EssentialAction |
invoke(java.util.function.Function<ServiceCall<Request,Response>,play.mvc.EssentialAction> wrapCall)
Low level hook for implementing service calls directly in Play.
|
default java.util.concurrent.CompletionStage<Response> |
invoke(Request request)
Invoke the service call.
|
handleRequestHeader, handleResponseHeader, invoke, withResponseHeader
default java.util.concurrent.CompletionStage<Response> invoke(Request request)
ServiceCall
invoke
in interface ServiceCall<Request,Response>
request
- The request entity.play.mvc.EssentialAction invoke(java.util.function.Function<ServiceCall<Request,Response>,play.mvc.EssentialAction> wrapCall)
wrapCall
- A function that takes a service call, and converts it to an EssentialAction. This action can
then be composed to modify any part of the request and or response, including request and
response headers and the request and response body. This does not have to be invoked at all if
it's not desired, but may be useful to get the benefit of all the Lagom features such as
serialization and deserialization.