类 EventQueue
java.lang.Object
io.github.a2ap.core.server.EventQueue
Event queue for A2A responses from agent.
Acts as a buffer between the agent's asynchronous execution and the
server's response handling (e.g., streaming via SSE). Supports tapping
to create child queues that receive the same events.
This is the Java equivalent of Python's EventQueue using Reactor's Sinks.Many.
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明reactor.core.publisher.Flux<SendStreamingMessageResponse>asFlux()Returns a Flux that emits events from this queue.voidclose()Closes the queue for future push events.voidEnqueues an event to this queue and all its children.booleanisClosed()Checks if the queue is closed.tap()Taps the event queue to create a new child queue that receives all future events.
-
构造器详细资料
-
EventQueue
public EventQueue()
-
-
方法详细资料
-
enqueueEvent
Enqueues an event to this queue and all its children.- 参数:
event- The event object to enqueue.
-
asFlux
Returns a Flux that emits events from this queue.- 返回:
- A Flux of events from the queue.
-
tap
Taps the event queue to create a new child queue that receives all future events.- 返回:
- A new EventQueue instance that will receive all events enqueued to this parent queue from this point forward.
-
close
public void close()Closes the queue for future push events. Once closed, the underlying Flux will complete. Also closes all child queues. -
isClosed
public boolean isClosed()Checks if the queue is closed.- 返回:
- true if the queue is closed, false otherwise.
-