T - public class SessionMonitor<T extends Session>
extends Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
SessionMonitor.MonitorState
Encapsulates time based state that rate limits our calls to the verification api.
|
| Modifier and Type | Field and Description |
|---|---|
protected SessionMonitor.MonitorState |
monitorState |
| Constructor and Description |
|---|
SessionMonitor(SessionManager<T> sessionManager,
ExecutorService executorService,
SessionVerifier<T> sessionVerifier) |
| Modifier and Type | Method and Description |
|---|---|
void |
monitorActivityLifecycle(ActivityLifecycleManager activityLifecycleManager)
This is how we hook into the activity lifecycle to detect if the user is using the app.
|
void |
triggerVerificationIfNecessary()
triggerVerificationIfNecessary checks if there are any sessions to verify and if enough time
has passed in order to run another verification.
|
protected void |
verifyAll() |
protected final SessionMonitor.MonitorState monitorState
public SessionMonitor(SessionManager<T> sessionManager, ExecutorService executorService, SessionVerifier<T> sessionVerifier)
sessionManager - A user auth based session managerexecutorService - used topublic void monitorActivityLifecycle(ActivityLifecycleManager activityLifecycleManager)
activityLifecycleManager - public void triggerVerificationIfNecessary()
protected void verifyAll()