public class ServletHttpHandlerAdapter extends Object implements Servlet
HttpHandler
to an HttpServlet
using Servlet Async support
and Servlet 3.1 non-blocking I/O.AbstractReactiveWebInitializer
Constructor and Description |
---|
ServletHttpHandlerAdapter(HttpHandler httpHandler) |
Modifier and Type | Method and Description |
---|---|
protected org.springframework.http.server.reactive.ServletServerHttpRequest |
createRequest(HttpServletRequest request,
AsyncContext context) |
protected org.springframework.http.server.reactive.ServletServerHttpResponse |
createResponse(HttpServletResponse response,
AsyncContext context,
org.springframework.http.server.reactive.ServletServerHttpRequest request) |
void |
destroy() |
int |
getBufferSize()
Return the configured input buffer size.
|
org.springframework.core.io.buffer.DataBufferFactory |
getDataBufferFactory() |
ServletConfig |
getServletConfig() |
String |
getServletInfo() |
String |
getServletPath()
Return the Servlet path under which the Servlet is deployed by checking
the Servlet registration from
init(ServletConfig) . |
void |
init(ServletConfig config) |
void |
service(ServletRequest request,
ServletResponse response) |
void |
setBufferSize(int bufferSize)
Set the size of the input buffer used for reading in bytes.
|
void |
setDataBufferFactory(org.springframework.core.io.buffer.DataBufferFactory dataBufferFactory) |
public ServletHttpHandlerAdapter(HttpHandler httpHandler)
public void setBufferSize(int bufferSize)
By default this is set to 8192.
public int getBufferSize()
@Nullable public String getServletPath()
init(ServletConfig)
.null
if this method is invoked
before the init(ServletConfig)
Servlet container callback.public void setDataBufferFactory(org.springframework.core.io.buffer.DataBufferFactory dataBufferFactory)
public org.springframework.core.io.buffer.DataBufferFactory getDataBufferFactory()
public void init(ServletConfig config)
public void service(ServletRequest request, ServletResponse response) throws ServletException, IOException
service
in interface Servlet
ServletException
IOException
protected org.springframework.http.server.reactive.ServletServerHttpRequest createRequest(HttpServletRequest request, AsyncContext context) throws IOException, URISyntaxException
IOException
URISyntaxException
protected org.springframework.http.server.reactive.ServletServerHttpResponse createResponse(HttpServletResponse response, AsyncContext context, org.springframework.http.server.reactive.ServletServerHttpRequest request) throws IOException
IOException
public String getServletInfo()
getServletInfo
in interface Servlet
@Nullable public ServletConfig getServletConfig()
getServletConfig
in interface Servlet