Class FcmServiceClientImpl
- java.lang.Object
-
- com.mongodb.stitch.server.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.server.services.fcm.FcmServiceClient
factory
-
-
Constructor Summary
Constructors Constructor Description FcmServiceClientImpl(CoreFcmServiceClient client)
-
Method Summary
Modifier and Type Method Description FcmSendMessageResultsendMessageTo(String to, FcmSendMessageRequest request)Sends an FCM message to the given target with the given request payload.FcmSendMessageResultsendMessageToRegistrationTokens(Collection<String> registrationTokens, FcmSendMessageRequest request)Sends an FCM message to the given set of registration tokens with the given request payload.FcmSendMessageResultsendMessageToUsers(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)
-
-
Method Detail
-
sendMessageTo
public 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:
- the result of sending the message.
-
sendMessageToUsers
public 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:
- the result of sending the message.
-
sendMessageToRegistrationTokens
public 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:
- the result of sending the message.
-
-