Interface TerminalViewSource

All Known Implementing Classes:
FileTerminalViewSource, TerminalViewLog

public interface TerminalViewSource
The read side of a terminal-view event stream.

Contract: events come back in ascending seq; every page carries a next token; an unknown or stale token throws TerminalViewSource.UnknownTokenException; implementations are thread-safe. There is no tail or before: the client model needs the events from the start, and an event stream is small next to a log.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
    Thrown for an unknown or stale token; endpoints answer 410 Gone.
  • Method Summary

    Modifier and Type
    Method
    Description
    page(String after, int max)
    Returns a forward page of events with a seq greater than the token's position.
  • Method Details

    • page

      TerminalViewPage page(String after, int max)
      Returns a forward page of events with a seq greater than the token's position.
      Parameters:
      after - The next token of the previous page, or null for the start.
      max - The maximum number of events.
      Returns:
      A forward page.
      Throws:
      TerminalViewSource.UnknownTokenException - If the token is unknown or stale.