Class SSEController

  • All Implemented Interfaces:
    com.embabel.agent.event.AgenticEventListener

    @RestController() 
    public final class SSEController
     implements AgenticEventListener
                        

    Spring Controller for Server-Sent Events (SSE) streaming of AgentProcessEvents. This controller by being registered as a bean via the RestController annotation will automatically listen for AgentProcessEvents because it implements AgenticEventListener. Each new listener will receive all events for that process to date.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      Unit onProcessEvent(AgentProcessEvent event) Listen to an event during the execution of an AgentProcess
      final SseEmitter streamEventsForId(@PathVariable() String processId)
      • Methods inherited from class com.embabel.agent.event.AgenticEventListener

        onPlatformEvent
      • Methods inherited from class java.lang.Object

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

    • Method Detail

      • streamEventsForId

        @GetMapping(value = {"/events/process/{processId}"}, produces = {"text/event-stream"}) final SseEmitter streamEventsForId(@PathVariable() String processId)