All Known Implementing Classes:
DummyBroadcaster, OptimizedBroadcaster

public interface Broadcaster
General Broadcaster API to send the same message to a set of clients.
Author:
Alexey Stashok
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    broadcast(Iterable<? extends WebSocket> recipients, byte[] binary)
    Broadcasts the provided binary content to the specified recipients.
    void
    broadcast(Iterable<? extends WebSocket> recipients, String text)
    Broadcasts the provided text content to the specified recipients.
    void
    broadcastFragment(Iterable<? extends WebSocket> recipients, byte[] binary, boolean last)
    Broadcasts the provided fragmented binary content to the specified recipients.
    void
    broadcastFragment(Iterable<? extends WebSocket> recipients, String text, boolean last)
    Broadcasts the provided fragmented text content to the specified recipients.
  • Method Details

    • broadcast

      void broadcast(Iterable<? extends WebSocket> recipients, String text)
      Broadcasts the provided text content to the specified recipients.
      Parameters:
      recipients - the recipients of the provided text content.
      text - textual content.
    • broadcast

      void broadcast(Iterable<? extends WebSocket> recipients, byte[] binary)
      Broadcasts the provided binary content to the specified recipients.
      Parameters:
      recipients - the recipients of the provided binary content.
      binary - binary content.
    • broadcastFragment

      void broadcastFragment(Iterable<? extends WebSocket> recipients, String text, boolean last)
      Broadcasts the provided fragmented text content to the specified recipients.
      Parameters:
      recipients - the recipients of the provided fragmented text content.
      text - fragmented textual content.
      last - true if this is the last fragment, otherwise false.
    • broadcastFragment

      void broadcastFragment(Iterable<? extends WebSocket> recipients, byte[] binary, boolean last)
      Broadcasts the provided fragmented binary content to the specified recipients.
      Parameters:
      recipients - the recipients of the provided fragmented binary content.
      binary - fragmented binary content.
      last - true if this is the last fragment, otherwise false.