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
  • Constructor Details

    • FunctionInvoker

      public FunctionInvoker()
    • FunctionInvoker

      public FunctionInvoker(Class<?> configurationClass)
  • Method Details

    • service

      public void service(com.google.cloud.functions.HttpRequest httpRequest, com.google.cloud.functions.HttpResponse httpResponse) throws Exception
      The implementation of a GCF HttpFunction that will be used as the entry point from GCF.
      Specified by:
      service in interface com.google.cloud.functions.HttpFunction
      Throws:
      Exception
    • accept

      public void accept(String json, com.google.cloud.functions.Context context)
      The implementation of a GCF RawBackgroundFunction that will be used as the entry point from GCF.
      Specified by:
      accept in interface com.google.cloud.functions.RawBackgroundFunction
      Parameters:
      json - the payload.
      context - event context.
      Since:
      3.0.5