Package io.getstream.chat.android.client
Object PayloadValidator
-
- All Implemented Interfaces:
public class PayloadValidator
-
-
Field Summary
Fields Modifier and Type Field Description public final static PayloadValidatorINSTANCE
-
Method Summary
Modifier and Type Method Description final BooleanisFromStreamServer(Map<String, Object> payload)Verify the payload comes from Stream Server. final BooleanisValidNewMessage(Map<String, Object> payload)Verify the payload contains needed field for a new message. final BooleanisValidPayload(Map<String, Object> payload)Verify the payload contains needed fields for the supported notification types. -
-
Method Detail
-
isFromStreamServer
final Boolean isFromStreamServer(Map<String, Object> payload)
Verify the payload comes from Stream Server.
- Returns:
true if the payload comes from Stream Server.
-
isValidNewMessage
final Boolean isValidNewMessage(Map<String, Object> payload)
Verify the payload contains needed field for a new message.
- Returns:
true if the payload contains all needed fields for a new message.
-
isValidPayload
final Boolean isValidPayload(Map<String, Object> payload)
Verify the payload contains needed fields for the supported notification types.
- Parameters:
payload- The payload to validate.- Returns:
true if the payload is valid for the supported notification types.
-
-
-
-