public class ServletHttpHandlerAdapter extends HttpHandlerAdapterSupport
HttpHandler
to an HttpServlet
using Servlet Async
support and Servlet 3.1 non-blocking I/O.Modifier and Type | Class and Description |
---|---|
private class |
ServletHttpHandlerAdapter.HandlerResultSubscriber |
Modifier and Type | Field and Description |
---|---|
private int |
bufferSize |
private DataBufferFactory |
dataBufferFactory |
private static int |
DEFAULT_BUFFER_SIZE |
logger
Constructor and Description |
---|
ServletHttpHandlerAdapter(HttpHandler httpHandler) |
ServletHttpHandlerAdapter(java.util.Map<java.lang.String,HttpHandler> handlerMap) |
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() |
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) |
getHttpHandler
private static final int DEFAULT_BUFFER_SIZE
private int bufferSize
private DataBufferFactory dataBufferFactory
public ServletHttpHandlerAdapter(HttpHandler httpHandler)
public ServletHttpHandlerAdapter(java.util.Map<java.lang.String,HttpHandler> handlerMap)
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 java.io.IOException
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 void init(ServletConfig config)
public ServletConfig getServletConfig()
public java.lang.String getServletInfo()
public void destroy()