Package com.tnsai.thread
Interface ThreadEvent
- All Known Implementing Classes:
ThreadEvent.Cancelled,ThreadEvent.CheckpointCreated,ThreadEvent.ChildCreated,ThreadEvent.Completed,ThreadEvent.Failed,ThreadEvent.MessageProcessed,ThreadEvent.Paused,ThreadEvent.QuotaExceeded,ThreadEvent.Resumed,ThreadEvent.Started
public sealed interface ThreadEvent
permits ThreadEvent.Started, ThreadEvent.Paused, ThreadEvent.Resumed, ThreadEvent.Completed, ThreadEvent.Failed, ThreadEvent.Cancelled, ThreadEvent.MessageProcessed, ThreadEvent.CheckpointCreated, ThreadEvent.QuotaExceeded, ThreadEvent.ChildCreated
Events emitted by
AgentThread during its lifecycle.- Since:
- 0.0.2
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordstatic final recordstatic final recordstatic final recordstatic enumstatic final recordstatic final recordstatic final recordstatic final recordstatic final recordstatic final record -
Method Summary
Modifier and TypeMethodDescriptionstatic ThreadEventcancelled(AgentThread thread) static ThreadEventcheckpointCreated(AgentThread thread, String checkpointId) static ThreadEventchildCreated(AgentThread parent, AgentThread child) static ThreadEventcompleted(AgentThread thread) static ThreadEventfailed(AgentThread thread, Throwable error) static ThreadEventmessageProcessed(AgentThread thread, String input, String output) static ThreadEventpaused(AgentThread thread) static ThreadEventquotaExceeded(AgentThread thread, String violation) static ThreadEventresumed(AgentThread thread) static ThreadEventstarted(AgentThread thread) threadId()type()
-
Method Details
-
threadId
String threadId() -
timestamp
Instant timestamp() -
type
ThreadEvent.EventType type() -
started
-
paused
-
resumed
-
completed
-
failed
-
cancelled
-
messageProcessed
-
checkpointCreated
-
quotaExceeded
-
childCreated
-