public class JsonInvoke extends Object
Created on 21/09/2017.
(c) 2017 Oracle Corporation
| Constructor and Description |
|---|
JsonInvoke() |
| Modifier and Type | Method and Description |
|---|---|
static <U> FlowFuture<HttpResponse> |
invokeFunction(Flow flow,
String functionId,
HttpMethod method,
Headers headers,
U input)
Invoke a void JSON function on a given flow by mapping the input to JSON, returns a future that completes with the HttpResponse of the function
if the function returns a successful http response, and completes with an error if the function invocation fails.
|
static <T extends Serializable,U> |
invokeFunction(Flow flow,
String functionId,
HttpMethod method,
Headers headers,
U input,
Class<T> responseType)
Invoke a JSON function on a given flow by mapping the input to JSON and composing a result stage that maps the argument back into the requested type.
|
public static <T extends Serializable,U> FlowFuture<T> invokeFunction(Flow flow, String functionId, HttpMethod method, Headers headers, U input, Class<T> responseType)
T - the return typeU - the input typeflow - the flow to invoke the subsequent call ontofunctionId - the function ID to invokemethod - the HTTP method to useheaders - additional headers to pass - the contentinput - the input objectresponseType - the response type to map the function result topublic static <U> FlowFuture<HttpResponse> invokeFunction(Flow flow, String functionId, HttpMethod method, Headers headers, U input)
U - the input typeflow - the flow to invoke the subsequent call ontofunctionId - the function ID to invokemethod - the HTTP method to useheaders - additional headers to pass - the contentinput - the input objectCopyright © 2021. All rights reserved.