Package 

Class ConnectSession


  • 
    public final class ConnectSession
    
                        

    Represents an active Connect session with lifecycle management.

    F-012: _isActive uses AtomicBoolean and close uses compareAndSet so that concurrent calls to close are safe — the cleanup branch executes exactly once regardless of how many threads call it simultaneously.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private final String id
      private final ConnectApp app
    • Method Summary

      Modifier and Type Method Description
      final String getId()
      final ConnectApp getApp()
      final Boolean isActive() Check if the session is currently active.
      final Unit close() Close the session and trigger cleanup.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • isActive

         final Boolean isActive()

        Check if the session is currently active.

      • close

         final Unit close()

        Close the session and trigger cleanup.

        Thread-safe: the callback is invoked at most once even if close is called concurrently from multiple threads.