-
public final class Network
-
-
Field Summary
Fields Modifier and Type Field Description private final ConcurrentHashMap<String, String>activeDeliveriesprivate StringapiKey
-
Method Summary
Modifier and Type Method Description final ConcurrentHashMap<String, String>getActiveDeliveries()final StringgetApiKey()final UnitsetApiKey(String apiKey)final StringdataPush(BatchData data, String idempotencyKey)final IntegerbeginStartGeneration(String clientSessionId)Claim a new start generation for this clientSessionId (invalidates any in-flight start). final UnitbumpSessionGeneration(String clientSessionId)Invalidate any in-flight start for this clientSessionId (called by every stop path). final IntegercurrentGeneration(String clientSessionId)final StringnewSession(NewSessionBodyInput data, Integer expectedGeneration)final UnitcompleteSession(String clientSessionID)final BooleanvalidateToken()Validates the current API token for dev mode privileges final UnitsetTriggerEvent(String clientSessionID, String event, Double timestamp)final BooleanhasPendingRequests()Check if there are pending network requests final IntegergetPendingRequestsCount()Get the count of pending network requests -
-
Method Detail
-
getActiveDeliveries
final ConcurrentHashMap<String, String> getActiveDeliveries()
-
beginStartGeneration
final Integer beginStartGeneration(String clientSessionId)
Claim a new start generation for this clientSessionId (invalidates any in-flight start).
-
bumpSessionGeneration
final Unit bumpSessionGeneration(String clientSessionId)
Invalidate any in-flight start for this clientSessionId (called by every stop path).
-
currentGeneration
final Integer currentGeneration(String clientSessionId)
-
newSession
final String newSession(NewSessionBodyInput data, Integer expectedGeneration)
-
completeSession
final Unit completeSession(String clientSessionID)
-
validateToken
final Boolean validateToken()
Validates the current API token for dev mode privileges
-
setTriggerEvent
@RequiresApi(value = 23) final Unit setTriggerEvent(String clientSessionID, String event, Double timestamp)
-
hasPendingRequests
final Boolean hasPendingRequests()
Check if there are pending network requests
-
getPendingRequestsCount
final Integer getPendingRequestsCount()
Get the count of pending network requests
-
-
-
-