Class GcfJarLauncher

  • All Implemented Interfaces:
    com.google.cloud.functions.HttpFunction, com.google.cloud.functions.RawBackgroundFunction

    public class GcfJarLauncher
    extends org.springframework.boot.loader.JarLauncher
    implements com.google.cloud.functions.HttpFunction, com.google.cloud.functions.RawBackgroundFunction
    The launcher class written at the top-level of the output JAR to be deployed to Google Cloud Functions. This is the entry point to the function when run from JAR.
    Author:
    Ray Tsang, Daniel Zou
    • Field Summary

      • Fields inherited from class org.springframework.boot.loader.ExecutableArchiveLauncher

        BOOT_CLASSPATH_INDEX_ATTRIBUTE
    • Constructor Summary

      Constructors 
      Constructor Description
      GcfJarLauncher()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void accept​(String json, com.google.cloud.functions.Context context)  
      void service​(com.google.cloud.functions.HttpRequest httpRequest, com.google.cloud.functions.HttpResponse httpResponse)  
      • Methods inherited from class org.springframework.boot.loader.JarLauncher

        getClassPathIndex, isNestedArchive, isPostProcessingClassPathArchives, isSearchCandidate, main
      • Methods inherited from class org.springframework.boot.loader.ExecutableArchiveLauncher

        createClassLoader, getArchive, getClassPathArchivesIterator, getMainClass, isExploded, postProcessClassPathArchives
      • Methods inherited from class org.springframework.boot.loader.Launcher

        createArchive, createClassLoader, createClassLoader, createMainMethodRunner, getClassPathArchives, launch, launch
    • Method Detail

      • service

        public void service​(com.google.cloud.functions.HttpRequest httpRequest,
                            com.google.cloud.functions.HttpResponse httpResponse)
                     throws Exception
        Specified by:
        service in interface com.google.cloud.functions.HttpFunction
        Throws:
        Exception
      • accept

        public void accept​(String json,
                           com.google.cloud.functions.Context context)
        Specified by:
        accept in interface com.google.cloud.functions.RawBackgroundFunction