public final class FcmServiceClientImpl extends Object implements FcmServiceClient
factory
Constructor and Description |
---|
FcmServiceClientImpl(CoreFcmServiceClient client,
TaskDispatcher dispatcher) |
Modifier and Type | Method and Description |
---|---|
Task<FcmSendMessageResult> |
sendMessageTo(String to,
FcmSendMessageRequest request)
Sends an FCM message to the given target with the given request payload.
|
Task<FcmSendMessageResult> |
sendMessageToRegistrationTokens(Collection<String> registrationTokens,
FcmSendMessageRequest request)
Sends an FCM message to the given set of registration tokens with the given request payload.
|
Task<FcmSendMessageResult> |
sendMessageToUsers(Collection<String> userIds,
FcmSendMessageRequest request)
Sends an FCM message to the given set of Stitch users with the given request payload.
|
public FcmServiceClientImpl(CoreFcmServiceClient client, TaskDispatcher dispatcher)
public Task<FcmSendMessageResult> sendMessageTo(String to, FcmSendMessageRequest request)
sendMessageTo
in interface FcmServiceClient
to
- the target to send a message to.request
- the details of the message.Task
that contains the result of sending the message.public Task<FcmSendMessageResult> sendMessageToUsers(Collection<String> userIds, FcmSendMessageRequest request)
sendMessageToUsers
in interface FcmServiceClient
userIds
- the Stitch users to send a message to.request
- the details of the message.Task
that contains the result of sending the message.public Task<FcmSendMessageResult> sendMessageToRegistrationTokens(Collection<String> registrationTokens, FcmSendMessageRequest request)
sendMessageToRegistrationTokens
in interface FcmServiceClient
registrationTokens
- the devices to send a message to.request
- the details of the message.Task
that contains the result of sending the message.