Class EventStream

java.lang.Object
energy.eddie.aiida.web.EventStream

@Component public class EventStream extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> org.springframework.http.ResponseEntity<reactor.core.publisher.Flux<T>>
    toJson(reactor.core.publisher.Flux<T> stream)
    Wraps a flux for an SSE endpoint produces = TEXT_EVENT_STREAM_VALUE.

    Methods inherited from class java.lang.Object

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

    • EventStream

      public EventStream()
  • Method Details

    • toJson

      public <T> org.springframework.http.ResponseEntity<reactor.core.publisher.Flux<T>> toJson(reactor.core.publisher.Flux<T> stream)
      Wraps a flux for an SSE endpoint produces = TEXT_EVENT_STREAM_VALUE.
      Type Parameters:
      T - the type of the source of the events
      Parameters:
      stream - the source for the events
      Returns:
      the SSE response