Class 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 Detail

      • FunctionInvoker

        public FunctionInvoker()
      • FunctionInvoker

        public FunctionInvoker​(Class<?> configurationClass)
    • Method Detail

      • 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