All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.firebase.messaging.FirebaseMessagingClient Maven / Gradle / Ivy

Go to download

This is the official Firebase Admin Java SDK. Build extraordinary native JVM apps in minutes with Firebase. The Firebase platform can power your app’s backend, user authentication, static hosting, and more.

There is a newer version: 9.2.0
Show newest version
package com.google.firebase.messaging;

import java.util.List;

/**
 * An interface for sending Firebase Cloud Messaging (FCM) messages.
 */
interface FirebaseMessagingClient {

  /**
   * Sends the given message with FCM.
   *
   * @param message A non-null {@link Message} to be sent.
   * @param dryRun A boolean indicating whether to perform a dry run (validation only) of the send.
   * @return A message ID string.
   * @throws FirebaseMessagingException If an error occurs while handing the message off to FCM for
   *     delivery.
   */
  String send(Message message, boolean dryRun) throws  FirebaseMessagingException;

  /**
   * Sends all the messages in the given list with FCM.
   *
   * @param messages A non-null, non-empty list of messages.
   * @param dryRun A boolean indicating whether to perform a dry run (validation only) of the send.
   * @return A {@link BatchResponse} indicating the result of the operation.
   * @throws FirebaseMessagingException If an error occurs while handing the messages off to FCM for
   *     delivery.
   */
  BatchResponse sendAll(List messages, boolean dryRun) throws FirebaseMessagingException;

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy