Package ai.mindconnect.adminui.service
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 theSui-Stream-Channelresponse 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 byActiveStreams.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 viabus.publish(name, data); reconnecting subscribers attach viabus.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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbus()Returns the value of thebusrecord component.cancel()Returns the value of thecancelrecord component.Returns the value of thechannelIdrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.label()Returns the value of thelabelrecord component.Returns the value of thereturnHrefrecord component.Returns the value of thestartedAtrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Handle
public Handle(String channelId, String label, String returnHref, Instant startedAt, Runnable cancel, StreamBus bus) Creates an instance of aHandlerecord class.- Parameters:
channelId- the value for thechannelIdrecord componentlabel- the value for thelabelrecord componentreturnHref- the value for thereturnHrefrecord componentstartedAt- the value for thestartedAtrecord componentcancel- the value for thecancelrecord componentbus- the value for thebusrecord component
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
channelId
Returns the value of thechannelIdrecord component.- Returns:
- the value of the
channelIdrecord component
-
label
Returns the value of thelabelrecord component.- Returns:
- the value of the
labelrecord component
-
returnHref
Returns the value of thereturnHrefrecord component.- Returns:
- the value of the
returnHrefrecord component
-
startedAt
Returns the value of thestartedAtrecord component.- Returns:
- the value of the
startedAtrecord component
-
cancel
Returns the value of thecancelrecord component.- Returns:
- the value of the
cancelrecord component
-
bus
Returns the value of thebusrecord component.- Returns:
- the value of the
busrecord component
-