@WebServlet(asyncSupported=true) public class ServletHttpHandlerAdapter extends Object implements Servlet
HttpHandler
to an HttpServlet
using Servlet Async
support and Servlet 3.1 non-blocking I/O.Constructor and Description |
---|
ServletHttpHandlerAdapter(HttpHandler httpHandler) |
Modifier and Type | Method and Description |
---|---|
protected ServerHttpRequest |
createRequest(HttpServletRequest request,
AsyncContext context) |
protected ServerHttpResponse |
createResponse(HttpServletResponse response,
AsyncContext context) |
void |
destroy() |
int |
getBufferSize()
Return the configured input buffer size.
|
DataBufferFactory |
getDataBufferFactory() |
ServletConfig |
getServletConfig() |
String |
getServletInfo() |
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(DataBufferFactory dataBufferFactory) |
public ServletHttpHandlerAdapter(HttpHandler httpHandler)
public void setBufferSize(int bufferSize)
By default this is set to 8192.
public int getBufferSize()
public void setDataBufferFactory(DataBufferFactory dataBufferFactory)
public DataBufferFactory getDataBufferFactory()
public void service(ServletRequest request, ServletResponse response) throws IOException
service
in interface Servlet
IOException
protected ServerHttpRequest createRequest(HttpServletRequest request, AsyncContext context) throws IOException
IOException
protected ServerHttpResponse createResponse(HttpServletResponse response, AsyncContext context) throws IOException
IOException
public void init(ServletConfig config)
@Nullable public ServletConfig getServletConfig()
getServletConfig
in interface Servlet
public String getServletInfo()
getServletInfo
in interface Servlet