Class MastodonStreaming

java.lang.Object
org.mastodon4j.core.impl.MastodonStreaming
All Implemented Interfaces:
BaseStreaming, Streaming

public class MastodonStreaming extends Object implements Streaming
  • Constructor Details

  • Method Details

    • health

      public String health()
      Description copied from interface: BaseStreaming
      Check if the server is alive.

      Verify that the streaming service is alive before connecting to it

      Specified by:
      health in interface BaseStreaming
      Returns:
      true if the service is alive, false otherwise
    • stream

      public EventStream stream()
      Description copied from interface: Streaming
      Establishing a WebSocket connection.

      Open a multiplexed WebSocket connection to receive events.

      The status stream object returned by this method needs to be closed by the consumer when no longer needed in order for the underlying websocket to be closed.

      Specified by:
      stream in interface Streaming
      Returns:
      a new closable status stream object