|
|
|
@ -1,5 +1,5 @@ |
|
|
|
/* |
|
|
|
/* |
|
|
|
* Copyright 2002-2024 the original author or authors. |
|
|
|
* Copyright 2002-2025 the original author or authors. |
|
|
|
* |
|
|
|
* |
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
@ -293,7 +293,7 @@ public interface ServerResponse { |
|
|
|
* @param consumer consumer that will be provided with an event builder |
|
|
|
* @param consumer consumer that will be provided with an event builder |
|
|
|
* @return the server-side event response |
|
|
|
* @return the server-side event response |
|
|
|
* @since 5.3.2 |
|
|
|
* @since 5.3.2 |
|
|
|
* @see <a href="https://www.w3.org/TR/eventsource/">Server-Sent Events</a> |
|
|
|
* @see <a href="https://html.spec.whatwg.org/multipage/server-sent-events.html">Server-Sent Events</a> |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
static ServerResponse sse(Consumer<SseBuilder> consumer) { |
|
|
|
static ServerResponse sse(Consumer<SseBuilder> consumer) { |
|
|
|
return SseServerResponse.create(consumer, null); |
|
|
|
return SseServerResponse.create(consumer, null); |
|
|
|
@ -323,7 +323,7 @@ public interface ServerResponse { |
|
|
|
* @param timeout maximum time period to wait before timing out |
|
|
|
* @param timeout maximum time period to wait before timing out |
|
|
|
* @return the server-side event response |
|
|
|
* @return the server-side event response |
|
|
|
* @since 5.3.2 |
|
|
|
* @since 5.3.2 |
|
|
|
* @see <a href="https://www.w3.org/TR/eventsource/">Server-Sent Events</a> |
|
|
|
* @see <a href="https://html.spec.whatwg.org/multipage/server-sent-events.html">Server-Sent Events</a> |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
static ServerResponse sse(Consumer<SseBuilder> consumer, Duration timeout) { |
|
|
|
static ServerResponse sse(Consumer<SseBuilder> consumer, Duration timeout) { |
|
|
|
return SseServerResponse.create(consumer, timeout); |
|
|
|
return SseServerResponse.create(consumer, timeout); |
|
|
|
|