Package com.rpl.agentorama
Interface AgentStream
- All Superinterfaces:
AutoCloseable,Closeable
Stream for accessing data emitted from a single agent node invoke.
The returned object can be closed to immediately stop streaming. The stream automatically closes when the node invoke completes.
Example:
AgentStream stream = client.stream(invoke, "myNode");
// Get current chunks
List<String> chunks = stream.get();
// Check for resets
int resets = stream.numResets();
-
Method Summary
-
Method Details
-
get
Gets the current streamed chunks.- Type Parameters:
T- the type of chunks being streamed- Returns:
- list of current chunks
-
numResets
int numResets()Gets the number of times the stream has been reset. Resets occur when nodes fail and retry, causing the stream to start over.- Returns:
- number of resets
-