目录

SampleEvent

java.lang.Object

|---com.huawei.hihealth.CommonParam

|---|---com.huawei.hihealth.model.SampleEvent

public class SampleEvent
extends CommonParam

Event notification.

Since:

2022-04-07

Nested Class Summary

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

Field Summary

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 Summary

Constructor and Description

SampleEvent(SampleEvent.Type type, java.lang.String subType, java.lang.String subscriptionId, long eventTime, java.util.List metaDatas) Constructor.

Method Summary

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.

SampleEvent.Type

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

Field Detail

[h2]SEPARATOR

public static final java.lang.String SEPARATOR

eventType separator.

See also:

Constant Field Values

Constructor Detail

[h2]SampleEvent

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.

Method Detail

[h2]getSubscriptionId

public java.lang.String getSubscriptionId()

Obtains the subscription record ID.

Returns:

Subscription record ID.

[h2]getType

public SampleEvent.Type getType()

Obtains the event notification type.

Returns:

Event type.

[h2]getSubType

public java.lang.String getSubType()

Obtains the event notification subtype.

Returns:

Event subtype.

[h2]getMetaData

public java.util.List getMetaData()

Obtains the message metadata list.

Returns:

Message metadata list.

[h2]getEventTime

public long getEventTime()

Obtains the time of event notification.

Returns:

Notification time.