Package com.kii.cloud.storage
Class PushToUserMessage
- java.lang.Object
-
- com.kii.cloud.storage.ReceivedMessage
-
- com.kii.cloud.storage.PushToUserMessage
-
public class PushToUserMessage extends com.kii.cloud.storage.ReceivedMessage
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
containsKiiTopic()
Checks whether push message contains KiiTopic or not.KiiGroup
getEventSourceGroup()
The payloads can contain the subscribed bucket/topic informations including the scope.KiiThing
getEventSourceThing()
The payloads can contain the subscribed bucket/topic informations including the scope.KiiUser
getEventSourceUser()
The payloads can contain the subscribed bucket/topic informations including the scope.KiiTopic
getKiiTopic()
Generate KiiTopic based on the information parsed from push message.PushMessageBundleHelper.MessageType
pushMessageType()
Return the push message type.
-
-
-
Method Detail
-
getKiiTopic
@Nullable public KiiTopic getKiiTopic()
Generate KiiTopic based on the information parsed from push message.- Returns:
- the topic instance in which a message is sent or null if
containsKiiTopic()
is false. - See Also:
containsKiiTopic()
-
containsKiiTopic
public boolean containsKiiTopic()
Checks whether push message contains KiiTopic or not.- Returns:
- true if the push message contains topic.
NOTE: Some configuration of field setting may cause this api to return false
even if the message contains topic id.
If either
KiiPushMessage.Builder.sendObjectScope(boolean)
orKiiPushMessage.Builder.sendTopicId(boolean)
set to false It is not possible to instantiate KiiTopic so it will return false.
-
getEventSourceGroup
@Nullable public KiiGroup getEventSourceGroup()
The payloads can contain the subscribed bucket/topic informations including the scope. This API provides convenience methods to obtainKiiGroup
if the payload contains group scoped bucket/topic information.- Returns:
KiiGroup
instance when the subscribed bucket/topic is group scope. In other cases returns null.
-
getEventSourceUser
@Nullable public KiiUser getEventSourceUser()
The payloads can contain the subscribed bucket/topic informations including the scope. This API provides convenience methods to obtainKiiUser
if the payload contains user scoped bucket/topic information.- Returns:
KiiUser
instance when the subscribed bucket/topic is user scope. In other cases returns null.
-
getEventSourceThing
@Nullable public KiiThing getEventSourceThing()
The payloads can contain the subscribed bucket/topic informations including the scope. This API provides convenience methods to obtainKiiThing
if the payload contains thing scoped bucket/topic information.- Returns:
KiiThing
instance when the subscribed bucket/topic is user scope. In other cases returns null.
-
pushMessageType
@NonNull public PushMessageBundleHelper.MessageType pushMessageType()
Return the push message type.- Specified by:
pushMessageType
in classcom.kii.cloud.storage.ReceivedMessage
- Returns:
PushMessageBundleHelper.MessageType
-
-