Record Class ActiveStreams.Handle

java.lang.Object
java.lang.Record
ai.mindconnect.adminui.service.ActiveStreams.Handle
Record Components:
channelId - client-facing stream id; same as the Sui-Stream-Channel response header.
label - human-readable label (used by status toasts).
returnHref - URL that re-renders the page that started the stream — used by the floating status toast as click target.
startedAt - registration time, for "running since" displays.
cancel - callback invoked by ActiveStreams.cancel(String); the endpoint that registered the stream supplies this when it wires up cancellation (e.g. chatService::cancelChat).
bus - per-channel multiplex bus + ring buffer. Producers publish via bus.publish(name, data); reconnecting subscribers attach via bus.attach(emitter, lastSeq).
Enclosing class:
ActiveStreams

public static record ActiveStreams.Handle(String channelId, String label, String returnHref, Instant startedAt, Runnable cancel, StreamBus bus) extends Record
One live SSE stream. The StreamBus is the multiplex fan-out the stream's producer publishes to; subscribers (the original POST connection plus any GET-based reconnects) attach to it via StreamBus.attach(org.springframework.web.servlet.mvc.method.annotation.SseEmitter, long).
  • Constructor Details

    • Handle

      public Handle(String channelId, String label, String returnHref, Instant startedAt, Runnable cancel, StreamBus bus)
      Creates an instance of a Handle record class.
      Parameters:
      channelId - the value for the channelId record component
      label - the value for the label record component
      returnHref - the value for the returnHref record component
      startedAt - the value for the startedAt record component
      cancel - the value for the cancel record component
      bus - the value for the bus record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • channelId

      public String channelId()
      Returns the value of the channelId record component.
      Returns:
      the value of the channelId record component
    • label

      public String label()
      Returns the value of the label record component.
      Returns:
      the value of the label record component
    • returnHref

      public String returnHref()
      Returns the value of the returnHref record component.
      Returns:
      the value of the returnHref record component
    • startedAt

      public Instant startedAt()
      Returns the value of the startedAt record component.
      Returns:
      the value of the startedAt record component
    • cancel

      public Runnable cancel()
      Returns the value of the cancel record component.
      Returns:
      the value of the cancel record component
    • bus

      public StreamBus bus()
      Returns the value of the bus record component.
      Returns:
      the value of the bus record component