File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
spring-web/src/main/java/org/springframework/http/server/reactive Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -49,16 +49,19 @@ public class ServletHttpHandlerAdapter extends HttpServlet {
49
49
50
50
private static Log logger = LogFactory .getLog (ServletHttpHandlerAdapter .class );
51
51
52
- private HttpHandler handler ;
52
+ private final HttpHandler handler ;
53
53
54
54
// Servlet is based on blocking I/O, hence the usage of non-direct, heap-based buffers
55
55
// (i.e. 'false' as constructor argument)
56
56
private DataBufferFactory dataBufferFactory = new DefaultDataBufferFactory (false );
57
57
58
58
private int bufferSize = DEFAULT_BUFFER_SIZE ;
59
59
60
-
61
- public void setHandler (HttpHandler handler ) {
60
+ /**
61
+ * Create a new {@code ServletHttpHandlerAdapter} with the given HTTP handler.
62
+ * @param handler the handler
63
+ */
64
+ public ServletHttpHandlerAdapter (HttpHandler handler ) {
62
65
Assert .notNull (handler , "'handler' must not be null" );
63
66
this .handler = handler ;
64
67
}
You can’t perform that action at this time.
0 commit comments