-
- All Implemented Interfaces:
-
com.bugsnag.android.Deliverable,com.bugsnag.android.JsonStream.Streamable,com.bugsnag.android.UserAware
public final class Session implements JsonStream.Streamable, Deliverable, UserAware
Represents a contiguous session in an application.
-
-
Method Summary
Modifier and Type Method Description StringgetId()Retrieves the session ID. voidsetId(@NonNull() String id)Sets the session ID. DategetStartedAt()Gets the session start time. voidsetStartedAt(@NonNull() Date startedAt)Sets the session start time. UsergetUser()Returns the currently set User information. voidsetUser(@Nullable() String id, @Nullable() String email, @Nullable() String name)Sets the user associated with the session. AppgetApp()Information set by the notifier about your app can be found in this field. voidsetApp(App app)DevicegetDevice()Information set by the notifier about your device can be found in this field. voidsetDevice(Device device)StringgetApiKey()The API key used for session sent to Bugsnag. voidsetApiKey(@NonNull() String apiKey)The API key used for session sent to Bugsnag. voidtoStream(@NonNull() JsonStream writer)Array<byte>toByteArray()StringgetIntegrityToken()-
Methods inherited from class com.bugsnag.android.JsonStream.Streamable
toStream -
Methods inherited from class com.bugsnag.android.Deliverable
getIntegrityToken, toByteArray -
Methods inherited from class com.bugsnag.android.UserAware
getUser, setUser -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getId
@NonNull() String getId()
Retrieves the session ID. This must be a unique value across all of your sessions.
-
setId
void setId(@NonNull() String id)
Sets the session ID. This must be a unique value across all of your sessions.
-
getStartedAt
@NonNull() Date getStartedAt()
Gets the session start time.
-
setStartedAt
void setStartedAt(@NonNull() Date startedAt)
Sets the session start time.
-
setUser
void setUser(@Nullable() String id, @Nullable() String email, @Nullable() String name)
Sets the user associated with the session.
-
getApp
@NonNull() App getApp()
Information set by the notifier about your app can be found in this field. These valuescan be accessed and amended if necessary.
-
getDevice
@NonNull() Device getDevice()
Information set by the notifier about your device can be found in this field. These valuescan be accessed and amended if necessary.
-
getApiKey
@NonNull() String getApiKey()
The API key used for session sent to Bugsnag. Even though the API key is set when Bugsnagis initialized, you may choose to send certain sessions to a different Bugsnag project.
-
setApiKey
void setApiKey(@NonNull() String apiKey)
The API key used for session sent to Bugsnag. Even though the API key is set when Bugsnagis initialized, you may choose to send certain sessions to a different Bugsnag project.
-
toStream
void toStream(@NonNull() JsonStream writer)
-
toByteArray
@NonNull() Array<byte> toByteArray()
-
getIntegrityToken
@Nullable() String getIntegrityToken()
-
-
-
-