java.lang.Object
io.helidon.webserver.sse.SseSinkProvider
- All Implemented Interfaces:
SinkProvider<SseEvent>
Sink provider for SSE type.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreate(ServerResponse response, BiConsumer<Object, MediaType> eventConsumer, Runnable closeRunnable) Creates a sink using this provider.booleansupports(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:SinkProviderChecks if a provider supports the type.- Specified by:
supportsin interfaceSinkProvider<SseEvent>- Parameters:
type- the typerequest- the current request- Returns:
- outcome of test
-
create
public <X extends Sink<SseEvent>> X create(ServerResponse response, BiConsumer<Object, MediaType> eventConsumer, Runnable closeRunnable) Description copied from interface:SinkProviderCreates a sink using this provider.- Specified by:
createin 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
-