Package one.nio.http

Class HttpClient.EventImpl

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String comment  
      private java.lang.String data  
      private java.lang.String id  
      private java.lang.String name  
    • Constructor Summary

      Constructors 
      Constructor Description
      EventImpl()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String comment()
      an SSE comment concatenated
      java.lang.String 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
      java.lang.String toString()  
      (package private) boolean with​(java.lang.String field, java.lang.StringBuilder databuf)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • id

        private java.lang.String id
      • name

        private java.lang.String name
      • data

        private java.lang.String data
      • comment

        private java.lang.String comment
    • Constructor Detail

      • EventImpl

        EventImpl()
    • Method Detail

      • name

        public java.lang.String name()
        Description copied from interface: EventSource.Event
        an SSE event name
        Specified by:
        name in interface EventSource.Event<java.lang.String>
        Returns:
        the event name
      • data

        public java.lang.String data()
        Description copied from interface: EventSource.Event
        an SSE "data" line.
        Specified by:
        data in interface EventSource.Event<java.lang.String>
        Returns:
        the event data
      • comment

        public java.lang.String comment()
        Description copied from interface: EventSource.Event
        an SSE comment concatenated
        Specified by:
        comment in interface EventSource.Event<java.lang.String>
        Returns:
        the event comment
      • with

        boolean with​(java.lang.String field,
                     java.lang.StringBuilder databuf)
      • isEmpty

        public boolean isEmpty()
        Description copied from interface: EventSource.Event
        No name, id and data in event ( only comment )
        Specified by:
        isEmpty in interface EventSource.Event<java.lang.String>
        Returns:
        true, if the event has no name, id and data. false, otherwise
      • toString

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