Class FunctionInvoker
java.lang.Object
org.springframework.cloud.function.adapter.gcp.FunctionInvoker
- All Implemented Interfaces:
com.google.cloud.functions.HttpFunction,com.google.cloud.functions.RawBackgroundFunction
public class FunctionInvoker
extends Object
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, Biju Kunjummen
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected FunctionCatalogstatic final StringConstant specifying Http Status Code. -
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.
-
Field Details
-
HTTP_STATUS_CODE
Constant specifying Http Status Code. Accessible to users by calling 'FunctionInvoker.HTTP_STATUS_CODE'- See Also:
-
catalog
-
-
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
-