java.lang.Object
org.springframework.cloud.function.serverless.web.ServerlessMVC

public final class ServerlessMVC extends Object
Represents the main entry point into interaction with web application over light-weight proxy. After creating an instance via INSTANCE(Class...) operation which will initialize the provided component classes of your web application (effectively starting your web application less web server), you use service(HttpServletRequest, HttpServletResponse) operation to send request and receive a response.
Author:
Oleg Zhurakousky
  • Field Details

    • INIT_TIMEOUT

      public static String INIT_TIMEOUT
      Name of the property to specify application context initialization timeout. Default is 20 sec.
  • Method Details

    • INSTANCE

      public static ServerlessMVC INSTANCE(Class<?>... componentClasses)
    • INSTANCE

      public static ServerlessMVC INSTANCE(org.springframework.boot.web.server.servlet.context.ServletWebServerApplicationContext applicationContext)
    • getApplicationContext

      public org.springframework.web.context.ConfigurableWebApplicationContext getApplicationContext()
    • getServletContext

      public jakarta.servlet.ServletContext getServletContext()
    • stop

      public void stop()
    • service

      public void service(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws Exception
      Process a serverless request through the configured servlet/filter chain.
      Parameters:
      request - the incoming request
      response - the outgoing response
      Throws:
      Exception
    • service

      public void service(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, CountDownLatch latch) throws Exception
      Throws:
      Exception
    • waitForContext

      public boolean waitForContext()