Class ServletHttpHandlerAdapter
java.lang.Object
org.springframework.http.server.reactive.ServletHttpHandlerAdapter
- All Implemented Interfaces:
- Servlet
- Direct Known Subclasses:
- TomcatHttpHandlerAdapter
Adapt 
HttpHandler to an HttpServlet using Servlet Async support
 and Servlet non-blocking I/O.- Since:
- 5.0
- Author:
- Arjen Poutsma, Rossen Stoyanchev
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected org.springframework.http.server.reactive.ServletServerHttpRequestcreateRequest(HttpServletRequest request, AsyncContext context) protected org.springframework.http.server.reactive.ServletServerHttpResponsecreateResponse(HttpServletResponse response, AsyncContext context, org.springframework.http.server.reactive.ServletServerHttpRequest request) voiddestroy()intReturn the configured input buffer size.Return the Servlet path under which the Servlet is deployed by checking the Servlet registration frominit(ServletConfig).voidinit(ServletConfig config) voidservice(ServletRequest request, ServletResponse response) voidsetBufferSize(int bufferSize) Set the size of the input buffer used for reading in bytes.voidsetDataBufferFactory(DataBufferFactory dataBufferFactory) 
- 
Constructor Details- 
ServletHttpHandlerAdapter
 
- 
- 
Method Details- 
setBufferSizepublic void setBufferSize(int bufferSize) Set the size of the input buffer used for reading in bytes.By default this is set to 8192. 
- 
getBufferSizepublic int getBufferSize()Return the configured input buffer size.
- 
getServletPathReturn the Servlet path under which the Servlet is deployed by checking the Servlet registration frominit(ServletConfig).- Returns:
- the path, or an empty string if the Servlet is deployed without
 a prefix (i.e. "/" or "/*"), or nullif this method is invoked before theinit(ServletConfig)Servlet container callback.
 
- 
setDataBufferFactory
- 
getDataBufferFactory
- 
init
- 
servicepublic void service(ServletRequest request, ServletResponse response) throws ServletException, IOException - Specified by:
- servicein interface- Servlet
- Throws:
- ServletException
- IOException
 
- 
createRequestprotected org.springframework.http.server.reactive.ServletServerHttpRequest createRequest(HttpServletRequest request, AsyncContext context) throws IOException, URISyntaxException - Throws:
- IOException
- URISyntaxException
 
- 
createResponseprotected org.springframework.http.server.reactive.ServletServerHttpResponse createResponse(HttpServletResponse response, AsyncContext context, org.springframework.http.server.reactive.ServletServerHttpRequest request) throws IOException - Throws:
- IOException
 
- 
getServletInfo- Specified by:
- getServletInfoin interface- Servlet
 
- 
getServletConfig- Specified by:
- getServletConfigin interface- Servlet
 
- 
destroypublic void destroy()
 
-