Class ServerSideEvent

  • All Implemented Interfaces:

    
    public final class ServerSideEvent
    
                        

    Server-side event data structure.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private final String eventType
      private final String eventPhase
      private final String url
      private final String message
      private final Instant timestamp
      private final Map<String, Object> metadata
    • Constructor Summary

      Constructors 
      Constructor Description
      ServerSideEvent(String eventType, String eventPhase, String url, String message, Instant timestamp, Map<String, Object> metadata)
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final String getEventType() The type of the event (e.g., "onWillLoad", "onFetched", "onHTMLDocumentParsed").
      final String getEventPhase() The phase of the event (e.g., "crawl", "load", "browse").
      final String getUrl() The URL associated with the event, if applicable.
      final String getMessage() Optional message or description of the event.
      final Instant getTimestamp() The timestamp when the event was created.
      final Map<String, Object> getMetadata() Additional metadata associated with the event.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ServerSideEvent

        ServerSideEvent(String eventType, String eventPhase, String url, String message, Instant timestamp, Map<String, Object> metadata)
    • Method Detail

      • getEventType

         final String getEventType()

        The type of the event (e.g., "onWillLoad", "onFetched", "onHTMLDocumentParsed").

      • getEventPhase

         final String getEventPhase()

        The phase of the event (e.g., "crawl", "load", "browse").

      • getUrl

         final String getUrl()

        The URL associated with the event, if applicable.

      • getMessage

         final String getMessage()

        Optional message or description of the event.

      • getTimestamp

         final Instant getTimestamp()

        The timestamp when the event was created.

      • getMetadata

         final Map<String, Object> getMetadata()

        Additional metadata associated with the event.