Session
An installation or uninstallation that's being actively staged.
The session by itself is passive, so to advance it an observer is needed to appropriately handle its lifecycle by calling necessary methods. TerminalStateListener is such an observer.
Parameters
a type of Failure for this session, may be InstallFailure or UninstallFailure.
Inheritors
Types
Callback interface for listening to Session state updates.
A StateListener which implements onStateChanged method. This listener will call session's methods on state changes appropriately.
Properties
Returns true
if this session was cancelled by invocation of cancel.
Returns true
if this session has ran to completion without cancelling.
Functions
Adds a StateListener to this session if it's not registered yet and appends the subscription to the subscriptions bag. The listener will be notified with current state immediately upon registering.
Commits everything that was prepared in the session. This will launch user's confirmation of installation or uninstallation.
Removes the provided StateListener from this session.