Class SseBroadcaster<I>

  • Type Parameters:
    I - the type of the SSE event sink specific information
    All Implemented Interfaces:
    Closeable, AutoCloseable

    @NonNullByDefault
    public class SseBroadcaster<@NonNull I>
    extends Object
    implements Closeable
    We do not use the SseBroadcaster as it seems registered SseEventSinks are not removed if the peer terminates the connection.
    Author:
    Markus Rathgeb - Initial contribution
    • Constructor Detail

      • SseBroadcaster

        public SseBroadcaster()
    • Method Detail

      • add

        public @Nullable I add​(javax.ws.rs.sse.SseEventSink sink,
                               @NonNull I info)
      • remove

        public @Nullable I remove​(javax.ws.rs.sse.SseEventSink sink)
      • getInfo

        public @Nullable I getInfo​(javax.ws.rs.sse.SseEventSink sink)
      • send

        public void send​(javax.ws.rs.sse.OutboundSseEvent event)
      • sendIf

        public void sendIf​(javax.ws.rs.sse.OutboundSseEvent event,
                           Predicate<@NonNull I> predicate)
      • closeAndRemoveIf

        public void closeAndRemoveIf​(Predicate<@NonNull I> predicate)