public class SessionClient extends Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
SessionClient.SessionState
Internal Representation of Application Session's state
|
| Modifier and Type | Field and Description |
|---|---|
protected static long |
DEFAULT_RESTART_DELAY |
protected static long |
DEFAULT_RESUME_DELAY |
protected static String |
NO_SESSION_ID |
protected com.amazonaws.mobileconnectors.pinpoint.internal.core.PinpointContext |
pinpointContext |
protected static String |
RESTART_DELAY_CONFIG_KEY |
protected static String |
RESUME_DELAY_CONFIG_KEY |
protected Session |
session |
static String |
SESSION_PAUSE_EVENT_TYPE
The eventType recorded for session pause events
|
static String |
SESSION_RESUME_EVENT_TYPE
The eventType recorded for session resume events
|
static String |
SESSION_START_EVENT_TYPE
The eventType recorded for session start events
|
static String |
SESSION_STOP_EVENT_TYPE
The eventType recorded for session stop events
|
protected static String |
SHARED_PREFS_SESSION_KEY |
| Constructor and Description |
|---|
SessionClient(com.amazonaws.mobileconnectors.pinpoint.internal.core.PinpointContext pinpointContext)
CONSTRUCTOR
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
executePause()
- Pause the current session object - Fire a Session Pause Event - Persist
Session to the file system.
|
protected void |
executeResume()
- Re-Activate the session - Fire Session Resume Event
|
protected void |
executeStart() |
protected void |
executeStop() |
long |
getRestartDelay() |
long |
getResumeDelay() |
protected Session |
getSession()
Getters
|
protected SessionClient.SessionState |
getSessionState()
Returns the Application Session's state
|
void |
pauseSession()
Briefly pauses an application session.
|
void |
resumeSession()
Resumes an application session.
|
void |
startSession()
Start a session which records a _session.start event and saves that sessionId
to the AnalyticsClient to be used for recording future events.
|
void |
stopSession()
Stops a session which records a _session.stop event and flushes the events in localstorage
for submission.
|
String |
toString()
Overridden toString method for testing
|
public static final String SESSION_START_EVENT_TYPE
public static final String SESSION_STOP_EVENT_TYPE
public static final String SESSION_PAUSE_EVENT_TYPE
public static final String SESSION_RESUME_EVENT_TYPE
protected static final long DEFAULT_RESUME_DELAY
protected static final long DEFAULT_RESTART_DELAY
protected static final String RESUME_DELAY_CONFIG_KEY
protected static final String RESTART_DELAY_CONFIG_KEY
protected static final String NO_SESSION_ID
protected static final String SHARED_PREFS_SESSION_KEY
protected final com.amazonaws.mobileconnectors.pinpoint.internal.core.PinpointContext pinpointContext
protected Session session
public SessionClient(com.amazonaws.mobileconnectors.pinpoint.internal.core.PinpointContext pinpointContext)
pinpointContext - The PinpointContextpublic void startSession()
public void stopSession()
public void pauseSession()
public void resumeSession()
public String toString()
protected void executeStart()
protected void executeStop()
protected void executePause()
protected void executeResume()
protected Session getSession()
public long getRestartDelay()
public long getResumeDelay()
protected SessionClient.SessionState getSessionState()
Copyright © 2017. All rights reserved.