Package io.jmix.dynmodelai.agent.runtime
Class ConversationSessionWatchdog
java.lang.Object
io.jmix.dynmodelai.agent.runtime.ConversationSessionWatchdog
@Component("dmagent_ConversationSessionWatchdog")
public class ConversationSessionWatchdog
extends Object
Closes the temporary work of Conversations whose UI went away without saying so.
A Builder normally closes its Conversation session itself, but a browser tab may vanish and a Vaadin session may expire without reaching the server code. Every API call of a Conversation and the Builder's idle heartbeat refresh its last-seen time; a Conversation nobody touched for the idle timeout is closed here. Planning and execution are protected; waiting for approval is not.
-
Constructor Summary
ConstructorsConstructorDescriptionConversationSessionWatchdog(AgentRunCoordinator runCoordinator, DynModelAgentProperties properties, ScheduledExecutorService scheduler) -
Method Summary
-
Constructor Details
-
ConversationSessionWatchdog
public ConversationSessionWatchdog(AgentRunCoordinator runCoordinator, DynModelAgentProperties properties, @Qualifier("dmagent_AgentScheduler") ScheduledExecutorService scheduler)
-
-
Method Details
-
start
@PostConstruct public void start() -
touch
Records that a UI still works with the Conversation. -
sweep
public void sweep()Closes the temporary work of every Conversation that has been idle for the configured timeout.
-