Class ProxyMvc
java.lang.Object
org.springframework.cloud.function.serverless.web.ProxyMvc
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
-
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.web.context.ConfigurableWebApplicationContextjakarta.servlet.ServletContextstatic ProxyMvcstatic ProxyMvcINSTANCE(org.springframework.web.context.ConfigurableWebApplicationContext applpicationContext) voidservice(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Perform a request and return a type that allows chaining further actions, such as asserting expectations, on the result.voidservice(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, CountDownLatch latch) voidstop()
-
Method Details
-
getApplicationContext
public org.springframework.web.context.ConfigurableWebApplicationContext getApplicationContext() -
getServletContext
public jakarta.servlet.ServletContext getServletContext() -
INSTANCE
public static ProxyMvc INSTANCE(org.springframework.web.context.ConfigurableWebApplicationContext applpicationContext) -
INSTANCE
-
stop
public void stop() -
service
public void service(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws Exception Perform a request and return a type that allows chaining further actions, such as asserting expectations, on the result.- Parameters:
requestBuilder- used to prepare the request to execute; see static factory methods inorg.springframework.test.web.servlet.request.MockMvcRequestBuilders- Throws:
Exception- See Also:
-
org.springframework.test.web.servlet.request.MockMvcRequestBuildersorg.springframework.test.web.servlet.result.MockMvcResultMatchers
-
service
public void service(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, CountDownLatch latch) throws Exception - Throws:
Exception
-