addCloseListener

Registers a listener that is invoked exactly once when this session reaches a terminal lifecycle state.

The callback runs on the thread that observes the close: connector watcher/reader thread for remote closure or the caller thread for local close. Implementations should return quickly and marshal to UI threads themselves when needed.

Parameters

listener

listener to add.