Package one.nio.http

Interface EventSource.Event<D>

  • All Known Implementing Classes:
    HttpClient.EventImpl
    Enclosing interface:
    EventSource<D>

    public static interface EventSource.Event<D>
    A single Server Sent Event, received from peer.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String comment()
      an SSE comment concatenated
      D data()
      an SSE "data" line.
      java.lang.String id()
      an SSE event id.
      boolean isEmpty()
      No name, id and data in event ( only comment )
      java.lang.String name()
      an SSE event name
    • Method Detail

      • isEmpty

        boolean isEmpty()
        No name, id and data in event ( only comment )
        Returns:
        true, if the event has no name, id and data. false, otherwise
      • name

        java.lang.String name()
        an SSE event name
        Returns:
        the event name
      • data

        D data()
        an SSE "data" line.
        Returns:
        the event data
      • comment

        java.lang.String comment()
        an SSE comment concatenated
        Returns:
        the event comment