File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,26 @@ public class SseEmitter extends ResponseBodyEmitter {
3939 static final MediaType TEXT_PLAIN = new MediaType ("text" , "plain" , Charset .forName ("UTF-8" ));
4040
4141
42+ /**
43+ * Create a new SseEmitter instance.
44+ */
45+ public SseEmitter () {
46+ super ();
47+ }
48+
49+ /**
50+ * Create a SseEmitter with a custom timeout value.
51+ * <p>By default not set in which case the default configured in the MVC
52+ * Java Config or the MVC namespace is used, or if that's not set, then the
53+ * timeout depends on the default of the underlying server.
54+ * @param timeout timeout value in milliseconds
55+ * @since 4.2.2
56+ */
57+ public SseEmitter (Long timeout ) {
58+ super (timeout );
59+ }
60+
61+
4262 @ Override
4363 protected void extendResponse (ServerHttpResponse outputMessage ) {
4464 super .extendResponse (outputMessage );
You can’t perform that action at this time.
0 commit comments