Class ServerSentEvent

  • All Implemented Interfaces:
    java.io.Serializable, scala.Equals, scala.Product

    public final class ServerSentEvent
    extends ServerSentEvent
    implements scala.Product, java.io.Serializable
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      ServerSentEvent​(java.lang.String data, scala.Option<java.lang.String> eventType, scala.Option<java.lang.String> id, scala.Option<java.lang.Object> retry)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static ServerSentEvent apply​(java.lang.String data, int retry)
      Creates a ServerSentEvent.
      static ServerSentEvent apply​(java.lang.String data, java.lang.String type)
      Creates a ServerSentEvent.
      static ServerSentEvent apply​(java.lang.String data, java.lang.String type, java.lang.String id)
      Creates a ServerSentEvent.
      java.lang.String data()  
      akka.util.ByteString encode()  
      scala.Option<java.lang.String> eventType()  
      java.lang.String getData()
      Data, may span multiple lines.
      java.util.Optional<java.lang.String> getEventType()
      Optional type, must not contain \n or \r.
      java.util.Optional<java.lang.String> getId()
      Optional id, must not contain \n or \r.
      java.util.OptionalInt getRetry()
      Optional reconnection delay in milliseconds.
      static ServerSentEvent heartbeat()  
      scala.Option<java.lang.String> id()  
      scala.Option<java.lang.Object> retry()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface scala.Equals

        canEqual, equals
      • Methods inherited from interface scala.Product

        productArity, productElement, productElementName, productElementNames, productIterator, productPrefix
    • Constructor Detail

      • ServerSentEvent

        public ServerSentEvent​(java.lang.String data,
                               scala.Option<java.lang.String> eventType,
                               scala.Option<java.lang.String> id,
                               scala.Option<java.lang.Object> retry)
    • Method Detail

      • apply

        public static ServerSentEvent apply​(java.lang.String data,
                                            java.lang.String type)
        Creates a ServerSentEvent.

        Parameters:
        data - data, may span multiple lines
        type - type, must not contain \n or \r
        Returns:
        (undocumented)
      • apply

        public static ServerSentEvent apply​(java.lang.String data,
                                            java.lang.String type,
                                            java.lang.String id)
        Creates a ServerSentEvent.

        Parameters:
        data - data, may span multiple lines
        type - type, must not contain \n or \r
        id - id, must not contain \n or \r
        Returns:
        (undocumented)
      • apply

        public static ServerSentEvent apply​(java.lang.String data,
                                            int retry)
        Creates a ServerSentEvent.

        Parameters:
        data - data, may span multiple lines
        retry - reconnection delay in milliseconds
        Returns:
        (undocumented)
      • data

        public java.lang.String data()
      • eventType

        public scala.Option<java.lang.String> eventType()
      • id

        public scala.Option<java.lang.String> id()
      • retry

        public scala.Option<java.lang.Object> retry()
      • encode

        public akka.util.ByteString encode()
      • getEventType

        public java.util.Optional<java.lang.String> getEventType()
        Description copied from class: ServerSentEvent
        Optional type, must not contain \n or \r.
        Specified by:
        getEventType in class ServerSentEvent
      • getId

        public java.util.Optional<java.lang.String> getId()
        Description copied from class: ServerSentEvent
        Optional id, must not contain \n or \r.
        Specified by:
        getId in class ServerSentEvent
      • getRetry

        public java.util.OptionalInt getRetry()
        Description copied from class: ServerSentEvent
        Optional reconnection delay in milliseconds.
        Specified by:
        getRetry in class ServerSentEvent