Package ai.acolite.agentsdk.core.shims
Class ReadableStreamImpl<T>
java.lang.Object
ai.acolite.agentsdk.core.shims.ReadableStreamImpl<T>
- All Implemented Interfaces:
ReadableStream<T>
ReadableStreamImpl
Simple implementation of ReadableStream using a BlockingQueue. Events are produced asynchronously and consumed via iteration.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ReadableStreamImpl
public ReadableStreamImpl()
-
-
Method Details
-
emit
Add an event to the stream -
complete
public void complete()Mark the stream as complete (no more events will be emitted) -
error
Mark the stream as failed with an error -
values
Description copied from interface:ReadableStreamvalues- Specified by:
valuesin interfaceReadableStream<T>- Returns:
- ReadableStreamAsyncIterator
-