-
Notifications
You must be signed in to change notification settings - Fork 7
/
PayloadMessageCollator.kt
26 lines (21 loc) · 1.02 KB
/
PayloadMessageCollator.kt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package io.embrace.android.embracesdk.session.message
import io.embrace.android.embracesdk.payload.Session
import io.embrace.android.embracesdk.payload.SessionMessage
import io.embrace.android.embracesdk.session.message.FinalEnvelopeParams.BackgroundActivityParams
import io.embrace.android.embracesdk.session.message.FinalEnvelopeParams.SessionParams
internal interface PayloadMessageCollator {
/**
* Builds a new session object. This should not be sent to the backend but is used
* to populate essential session information (such as ID), etc
*/
fun buildInitialSession(params: InitialEnvelopeParams): Session
/**
* Builds a fully populated session message. This can be sent to the backend (or stored
* on disk).
*/
fun buildFinalSessionMessage(params: SessionParams): SessionMessage
/**
* Create the background session message with the current state of the background activity.
*/
fun buildFinalBackgroundActivityMessage(params: BackgroundActivityParams): SessionMessage
}