@WebServlet(asyncSupported=true) 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.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() |
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(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(DataBufferFactory dataBufferFactory)
public 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 ServerHttpRequest createRequest(HttpServletRequest request, AsyncContext context) throws java.io.IOException
java.io.IOException
protected ServerHttpResponse createResponse(HttpServletResponse response, AsyncContext context) throws java.io.IOException
java.io.IOException
public java.lang.String getServletInfo()
getServletInfo
in interface Servlet
@Nullable public ServletConfig getServletConfig()
getServletConfig
in interface Servlet