Class SseBroadcaster<I>

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

    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.
    Markus Rathgeb - Initial contribution
    • Constructor Detail

      • SseBroadcaster

        public SseBroadcaster()
    • Method Detail

      • add

        public @Nullable I add​( sink,
                               @NonNull I info)
      • remove

        public @Nullable I remove​( sink)
      • getInfo

        public @Nullable I getInfo​( sink)
      • send

        public void send​( event)
      • sendIf

        public void sendIf​( event,
                           Predicate<@NonNull I> predicate)
      • closeAndRemoveIf

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