Class SseEvent


  • public class SseEvent
    extends java.lang.Object
    The representation of an SSE event.
    Author:
    Torsten Oltmanns
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  SseEvent.Builder
      A builder to create SseEvents.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static long RETRY_NOT_SET  
    • Constructor Summary

      Constructors 
      Constructor Description
      SseEvent()
      Constructor.
    • Method Summary

      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      java.lang.String getComment()
      Gets the event comment.
      java.lang.String getData()
      Gets the event data.
      java.lang.String getId()
      Gets the event id.
      java.lang.String getName()
      Gets the event name.
      long getRetry()
      Gets the event connection retry delay.
      int hashCode()  
      boolean isReconnectDelaySet()
      Gets whether a event connection retry delay is set.
      void setComment​(java.lang.String comment)
      Sets the event comment.
      void setData​(java.lang.String data)
      Sets the event data.
      void setId​(java.lang.String id)
      Sets the event id.
      void setName​(java.lang.String name)
      Sets the event name.
      void setRetry​(long reconnectDelay)
      Sets the event connection retry delay.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • SseEvent

        public SseEvent()
        Constructor.
    • Method Detail

      • getId

        public java.lang.String getId()
        Gets the event id.
        Returns:
        the event id
      • setId

        public void setId​(java.lang.String id)
        Sets the event id.
        Parameters:
        id - the event id
      • getName

        public java.lang.String getName()
        Gets the event name.
        Returns:
        the event name
      • setName

        public void setName​(java.lang.String name)
        Sets the event name.
        Parameters:
        name - the event name
      • getComment

        public java.lang.String getComment()
        Gets the event comment.
        Returns:
        the event comment
      • setComment

        public void setComment​(java.lang.String comment)
        Sets the event comment.
        Parameters:
        comment - the event comment
      • getData

        public java.lang.String getData()
        Gets the event data.
        Returns:
        the event data
      • setData

        public void setData​(java.lang.String data)
        Sets the event data.
        Parameters:
        data - the event data
      • getRetry

        public long getRetry()
        Gets the event connection retry delay.
        Returns:
        the event connection retry delay
      • setRetry

        public void setRetry​(long reconnectDelay)
        Sets the event connection retry delay.
        Parameters:
        reconnectDelay - the event connection retry delay
      • isReconnectDelaySet

        public boolean isReconnectDelaySet()
        Gets whether a event connection retry delay is set.
        Returns:
        the flag whether the event connection retry delay is set
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object