public class ServletHttpHandlerAdapter extends java.lang.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() |
java.lang.String |
getServletInfo() |
java.lang.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 java.lang.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, java.io.IOException
service
in interface Servlet
ServletException
java.io.IOException
protected org.springframework.http.server.reactive.ServletServerHttpRequest createRequest(HttpServletRequest request, AsyncContext context) throws java.io.IOException, java.net.URISyntaxException
java.io.IOException
java.net.URISyntaxException
protected org.springframework.http.server.reactive.ServletServerHttpResponse createResponse(HttpServletResponse response, AsyncContext context, org.springframework.http.server.reactive.ServletServerHttpRequest request) throws java.io.IOException
java.io.IOException
public java.lang.String getServletInfo()
getServletInfo
in interface Servlet
@Nullable public ServletConfig getServletConfig()
getServletConfig
in interface Servlet