java.lang.Object
io.helidon.webserver.sse.SseSinkProvider
- All Implemented Interfaces:
SinkProvider<SseEvent>
Sink provider for SSE type.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreate
(ServerResponse response, BiConsumer<Object, MediaType> eventConsumer, Runnable closeRunnable) Deprecated, for removal: This API element is subject to removal in a future version.create
(SinkProviderContext context) Creates a Sink for SSE events.boolean
supports
(GenericType<? extends Sink<?>> type, ServerRequest request) Checks if a provider supports the type.
-
Constructor Details
-
SseSinkProvider
public SseSinkProvider()
-
-
Method Details
-
supports
Description copied from interface:SinkProvider
Checks if a provider supports the type.- Specified by:
supports
in interfaceSinkProvider<SseEvent>
- Parameters:
type
- the typerequest
- the current request- Returns:
- outcome of test
-
create
Creates a Sink for SSE events.- Specified by:
create
in interfaceSinkProvider<SseEvent>
- Type Parameters:
X
- type of sink- Parameters:
context
- the context- Returns:
- newly created sink
-
create
@Deprecated(since="4.1.2", forRemoval=true) public <X extends Sink<SseEvent>> X create(ServerResponse response, BiConsumer<Object, MediaType> eventConsumer, Runnable closeRunnable) Deprecated, for removal: This API element is subject to removal in a future version.replaced bycreate(SinkProviderContext)
Creates a Sink for SSE events.- Specified by:
create
in interfaceSinkProvider<SseEvent>
- Type Parameters:
X
- type of sink- Parameters:
response
- the HTTP responseeventConsumer
- an event consumercloseRunnable
- a runnable to call on close- Returns:
- newly created sink
-
create(SinkProviderContext)