Class SessionRegistry

java.lang.Object
com.tnsai.channels.routing.SessionRegistry

public class SessionRegistry extends Object
Tracks active channel sessions. A session represents an ongoing conversation between a user on a specific channel and the agent system.
  • Constructor Details

    • SessionRegistry

      public SessionRegistry()
  • Method Details

    • touch

      public void touch(String sessionKey, String channelId, String conversationId)
      Updates the last-active timestamp for a session, creating it if needed.
      Parameters:
      sessionKey - unique key (channelId:conversationId)
      channelId - originating channel
      conversationId - conversation within that channel
    • get

    • getAll

    • remove

      public void remove(String sessionKey)
    • reapIdle

      public int reapIdle(Duration maxIdle)
      Removes sessions that have been idle longer than the given threshold.
    • size

      public int size()