java.lang.Object |---com.huawei.hihealth.CommonParam |---|---com.huawei.hihealth.model.SampleEvent public class SampleEvent extends CommonParam |
Event notification.
Since:
2022-04-07
Modifier and Type | Class and Description |
|---|---|
static class | SampleEvent.Type Event notification type enum. |
Nested classes/interfaces inherited from interface android.os.Parcelable |
|---|
android.os.Parcelable.ClassLoaderCreator, android.os.Parcelable.Creator |
Modifier and Type | Field and Description |
|---|---|
static java.lang.String | SEPARATOR eventType separator. |
Fields inherited from interface android.os.Parcelable |
|---|
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE |
Constructor and Description |
|---|
SampleEvent(SampleEvent.Type type, java.lang.String subType, java.lang.String subscriptionId, long eventTime, java.util.List metaDatas) Constructor. |
Modifier and Type | Method and Description |
|---|---|
long | getEventTime() Obtains the time of event notification. |
java.util.List | getMetaData() Obtains the message metadata list. |
java.lang.String | getSubscriptionId() Obtains the subscription record ID. |
java.lang.String | getSubType() Obtains the event notification subtype. |
getType() Obtains the event notification type. |
Methods inherited from class com.huawei.hihealth.CommonParam |
|---|
getBoolean, getDouble, getInt, getString, putBoolean, putDouble, putInt, putString |
Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface android.os.Parcelable |
|---|
describeContents, writeToParcel |
public SampleEvent(SampleEvent.Type type, java.lang.String subType, java.lang.String subscriptionId, long eventTime, java.util.List metaDatas)
Constructor.
Parameters:
Parameter Name | Parameter Description |
|---|---|
type | Event type. |
subType | Event subtype. |
subscriptionId | Subscription record ID. |
eventTime | Time when an event occurs. |
metaDatas | Event message metadata list. |
public java.lang.String getSubscriptionId()
Obtains the subscription record ID.
Returns:
Subscription record ID.
public SampleEvent.Type getType()
Obtains the event notification type.
Returns:
Event type.
public java.lang.String getSubType()
Obtains the event notification subtype.
Returns:
Event subtype.