| Modifier and Type | Method and Description |
|---|---|
protected void |
addSession(SFSession session,
long masterTokenValidityInSecs)
Method to add a session
It will compare the master token validity and stored master token validity
and if it is less, we will update the stored one and the heartbeat interval
and reschedule heartbeat.
|
static HeartbeatBackground |
getInstance() |
protected void |
removeSession(SFSession session)
Method to remove a session.
|
void |
run()
Run heartbeat: for each session send a heartbeat request and schedule
next heartbeat as long as there are sessions left.
|
public static HeartbeatBackground getInstance()
protected void addSession(SFSession session, long masterTokenValidityInSecs)
session - the session will be addedmasterTokenValidityInSecs - time interval for which client need to
check validity of master token with serverprotected void removeSession(SFSession session)
session - the session will be removedpublic void run()
Copyright © 2017. All rights reserved.