Class FcmServiceClientImpl
- java.lang.Object
-
- com.mongodb.stitch.android.services.fcm.internal.FcmServiceClientImpl
-
- All Implemented Interfaces:
FcmServiceClient
public final class FcmServiceClientImpl extends Object implements FcmServiceClient
-
-
Field Summary
-
Fields inherited from interface com.mongodb.stitch.android.services.fcm.FcmServiceClient
factory
-
-
Constructor Summary
Constructors Constructor Description FcmServiceClientImpl(CoreFcmServiceClient client, TaskDispatcher dispatcher)
-
Method Summary
Modifier and Type Method 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.
-
-
-
Constructor Detail
-
FcmServiceClientImpl
public FcmServiceClientImpl(CoreFcmServiceClient client, TaskDispatcher dispatcher)
-
-
Method Detail
-
sendMessageTo
public Task<FcmSendMessageResult> sendMessageTo(String to, FcmSendMessageRequest request)
Sends an FCM message to the given target with the given request payload.- Specified by:
sendMessageToin interfaceFcmServiceClient- Parameters:
to- the target to send a message to.request- the details of the message.- Returns:
- A
Taskthat contains the result of sending the message.
-
sendMessageToUsers
public Task<FcmSendMessageResult> sendMessageToUsers(Collection<String> userIds, FcmSendMessageRequest request)
Sends an FCM message to the given set of Stitch users with the given request payload.- Specified by:
sendMessageToUsersin interfaceFcmServiceClient- Parameters:
userIds- the Stitch users to send a message to.request- the details of the message.- Returns:
- A
Taskthat contains the result of sending the message.
-
sendMessageToRegistrationTokens
public Task<FcmSendMessageResult> sendMessageToRegistrationTokens(Collection<String> registrationTokens, FcmSendMessageRequest request)
Sends an FCM message to the given set of registration tokens with the given request payload.- Specified by:
sendMessageToRegistrationTokensin interfaceFcmServiceClient- Parameters:
registrationTokens- the devices to send a message to.request- the details of the message.- Returns:
- A
Taskthat contains the result of sending the message.
-
-