Class Result
java.lang.Object
org.apache.fineract.infrastructure.gcm.domain.Result
- All Implemented Interfaces:
Serializable
Result of a GCM message request that returned HTTP status code 200.
If the message is successfully created, the
returns the message id and
invalid reference
#getMessageId()
returns null; otherwise,
invalid reference
#getErrorCode()
returns null and
invalid reference
#getMessageId()
returns the code of the error.
invalid reference
#getErrorCode()
There are cases when a request is accept and the message successfully created, but GCM has a canonical registration id for that device. In this case, the server should update the registration id to avoid rejected requests in the future.
In a nutshell, the workflow to handle a result is:
- Call: - null means error, callinvalid reference
#getMessageId()- non-null means the message was created: - Callinvalid reference
#getErrorCode()- if it returns null, do nothing. - otherwise, update the server datastore with the new id.invalid reference
#getCanonicalRegistrationId()
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary