Class GcfJarLauncher

java.lang.Object
org.springframework.boot.loader.Launcher
org.springframework.boot.loader.ExecutableArchiveLauncher
org.springframework.boot.loader.JarLauncher
org.springframework.cloud.function.adapter.gcp.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
     
  • Method Summary

    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • 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