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

    • SseBroadcaster

      public SseBroadcaster()
  • Method Details

    • addListener

      public void addListener(SseBroadcaster.Listener<@NonNull I> listener)
    • removeListener

      public void removeListener(SseBroadcaster.Listener<@NonNull I> listener)
    • add

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

      public @Nullable I remove( sink)
    • getInfo

      public @Nullable I getInfo( sink)
    • getInfoIf

      public Stream<I> getInfoIf(Predicate<@NonNull I> predicate)
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
    • send

      public void send( event)
    • sendIf

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

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