public class ScribeClient
extends Object
scribe(ScribeEvent, long). This records the event
to local storage for uploading sometime in the near future. Scribe settings will determine when
the actual upload occurs. For example, scribe events may be uploaded every 60 seconds, or
every 100 KB of events. Upon successful upload, scribe events are removed from local storage.
To scribe an event and have it uploaded immediately, call scribeAndFlush(ScribeEvent, long).| Constructor and Description |
|---|
ScribeClient(Context context,
ScheduledExecutorService executor,
ScribeConfig scribeConfig,
ScribeEvent.Transform transform,
TwitterAuthConfig authConfig,
SessionManager<? extends Session<TwitterAuthToken>> sessionManager,
GuestSessionProvider guestSessionProvider,
IdManager idManager)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
scribe(ScribeEvent event,
long ownerId)
Scribes an event.
|
boolean |
scribeAndFlush(ScribeEvent event,
long ownerId)
Scribes an event and immediately flushes the event.
|
public ScribeClient(Context context,
ScheduledExecutorService executor,
ScribeConfig scribeConfig,
ScribeEvent.Transform transform,
TwitterAuthConfig authConfig,
SessionManager<? extends Session<TwitterAuthToken>> sessionManager,
GuestSessionProvider guestSessionProvider,
IdManager idManager)
context - the contextexecutor - scheduled executor service for executing scribe requests on background threadscribeConfig - the scribe configurationtransform - the scribe event transform for serializing and deserializing scribe events
flush of all queued events as long as a network connection is available.authConfig - the auth configurationsessionManager - the session manageridManager - the id manager used to provide the device idpublic boolean scribe(ScribeEvent event, long ownerId)
public boolean scribeAndFlush(ScribeEvent event, long ownerId)