public final class MesosferLog
extends java.lang.Object
MesosferLog
used to send analytic log based on beacon activity to the Mesosfer cloud.Constructor and Description |
---|
MesosferLog() |
Modifier and Type | Method and Description |
---|---|
static MesosferLog |
createLog()
Constructs a new
MesosferLog with no data in it. |
void |
sendAsync(SaveCallback callback)
Saves this object to the server at some unspecified time in the future, even if Mesosfer is
currently inaccessible.
|
MesosferLog |
setBeacon(MesosferLog beacon)
Sets beacon for log.
|
MesosferLog |
setEvent(MesosferBeacon.Event event)
Sets event for logging.
|
MesosferLog |
setInterval(long interval)
Sets interval between onEnter and onExit state.
|
MesosferLog |
setModule(MesosferBeacon.Module type)
Sets module for logging.
|
public static MesosferLog createLog()
MesosferLog
with no data in it. A MesosferLog
constructed in this way will not have an objectId and will not persist to the database until
sendAsync(SaveCallback)
is called.MesosferLog
public MesosferLog setBeacon(MesosferLog beacon)
beacon
- the MesosferBeacon
object.public MesosferLog setInterval(long interval)
interval
- the interval in milliseconds.public MesosferLog setModule(MesosferBeacon.Module type)
type
- the MesosferBeacon.Module
type of beacon.public MesosferLog setEvent(MesosferBeacon.Event event)
event
- the MesosferBeacon.Event
event of beacon.public void sendAsync(SaveCallback callback)
#sendAsync()
will cause old saves to be silently discarded
until the connection can be re-established, and the queued objects can be saved.callback
- A callback which will be called if the save completes before the app exits.