Class FunctionInvoker
java.lang.Object
org.springframework.cloud.function.context.AbstractSpringFunctionAdapterInitializer<com.google.cloud.functions.HttpRequest>
org.springframework.cloud.function.adapter.gcp.FunctionInvoker
- All Implemented Interfaces:
com.google.cloud.functions.HttpFunction,com.google.cloud.functions.RawBackgroundFunction,Closeable,AutoCloseable
public class FunctionInvoker
extends AbstractSpringFunctionAdapterInitializer<com.google.cloud.functions.HttpRequest>
implements com.google.cloud.functions.HttpFunction, com.google.cloud.functions.RawBackgroundFunction
Implementation of
HttpFunction and RawBackgroundFunction for Google
Cloud Function (GCF). This is the Spring Cloud Function adapter for GCF HTTP and Raw
Background function.- Since:
- 3.0.4
- Author:
- Dmitry Solomakha, Mike Eltsufin, Oleg Zhurakousky
-
Field Summary
Fields inherited from class org.springframework.cloud.function.context.AbstractSpringFunctionAdapterInitializer
catalog, jsonMapper, TARGET_EXECUTION_CTX_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidThe implementation of a GCFRawBackgroundFunctionthat will be used as the entry point from GCF.voidservice(com.google.cloud.functions.HttpRequest httpRequest, com.google.cloud.functions.HttpResponse httpResponse) The implementation of a GCFHttpFunctionthat will be used as the entry point from GCF.Methods inherited from class org.springframework.cloud.function.context.AbstractSpringFunctionAdapterInitializer
apply, clear, close, convertOutput, doResolveName, function, getContext, getFunction, getInputType, initialize, result
-
Constructor Details
-
FunctionInvoker
public FunctionInvoker() -
FunctionInvoker
-
-
Method Details
-
service
public void service(com.google.cloud.functions.HttpRequest httpRequest, com.google.cloud.functions.HttpResponse httpResponse) throws Exception The implementation of a GCFHttpFunctionthat will be used as the entry point from GCF.- Specified by:
servicein interfacecom.google.cloud.functions.HttpFunction- Throws:
Exception
-
accept
The implementation of a GCFRawBackgroundFunctionthat will be used as the entry point from GCF.- Specified by:
acceptin interfacecom.google.cloud.functions.RawBackgroundFunction- Parameters:
json- the payload.context- event context.- Since:
- 3.0.5
-