Interface EventStream

All Superinterfaces:
AutoCloseable
All Known Implementing Classes:
MastodonEventStream

public interface EventStream extends AutoCloseable
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Sends the given subscription to that stream.
    void
    Closes the event stream and its underlying resources.
    void
    registerConsumer(Consumer<Event> statusConsumer)
    Adds a new event consumer to this stream.
  • Method Details

    • registerConsumer

      void registerConsumer(Consumer<Event> statusConsumer)
      Adds a new event consumer to this stream.
      Parameters:
      statusConsumer - the event consumer to add
    • changeSubscription

      void changeSubscription(Subscription subscription)
      Sends the given subscription to that stream.
      Parameters:
      subscription - the subscription definition
    • close

      void close() throws MastodonException
      Closes the event stream and its underlying resources.
      Specified by:
      close in interface AutoCloseable
      Throws:
      MastodonException - if a error during the close operation occurs