Class ServerlessMVC
java.lang.Object
org.springframework.cloud.function.serverless.web.ServerlessMVC
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
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic StringName of the property to specify application context initialization timeout. -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.web.context.ConfigurableWebApplicationContextjakarta.servlet.ServletContextstatic ServerlessMVCstatic ServerlessMVCINSTANCE(org.springframework.boot.web.server.servlet.context.ServletWebServerApplicationContext applicationContext) voidservice(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Process a serverless request through the configured servlet/filter chain.voidservice(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, CountDownLatch latch) voidstop()boolean
-
Field Details
-
INIT_TIMEOUT
Name of the property to specify application context initialization timeout. Default is 20 sec.
-
-
Method Details
-
INSTANCE
-
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 requestresponse- 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()
-