I - input typeO - output type@Singleton public class HttpFunctionExecutor<I,O> extends java.lang.Object implements FunctionInvoker<I,O>, java.io.Closeable, FunctionInvokerChooser
FunctionExecutor that uses a HttpClient to execute a remote function definition.| Constructor and Description | 
|---|
| HttpFunctionExecutor(HttpClient httpClient)Constructor. | 
| Modifier and Type | Method and Description | 
|---|---|
| <I1,O2> java.util.Optional<FunctionInvoker<I1,O2>> | choose(FunctionDefinition definition)Chooses a  FunctionInvoker. | 
| void | close() | 
| O | invoke(FunctionDefinition definition,
      I input,
      Argument<O> outputType)Invoke the given function definition for the given input and expected response type. | 
public HttpFunctionExecutor(HttpClient httpClient)
httpClient - The HTTP clientpublic O invoke(FunctionDefinition definition, I input, Argument<O> outputType)
FunctionInvokerinvoke in interface FunctionInvoker<I,O>definition - The definitioninput - The inputoutputType - The response typepublic <I1,O2> java.util.Optional<FunctionInvoker<I1,O2>> choose(FunctionDefinition definition)
FunctionInvokerChooserFunctionInvoker.choose in interface FunctionInvokerChooserI1 - input typeO2 - output typedefinition - The definitionOptional instance of FunctionInvoker@PreDestroy
public void close()
                       throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOException