Interface PushClient


public interface PushClient
The push client is used to send the notification and retrieve the notification status.
  • Method Details

    • pushToApplication

      PushResponse pushToApplication(PushPayload pushPayload) throws ClientException
      Triggers a notification to all registered users of an application.
      Parameters:
      pushPayload - payload
      Returns:
      response
      Throws:
      ClientException
    • pushToApplication

      PushResponse pushToApplication(LocalizedPushPayload pushPayload) throws ClientException
      Triggers a notification to all registered users of an application.
      Parameters:
      pushPayload - payload
      Returns:
      response
      Throws:
      ClientException
    • pushToDevice

      PushResponse pushToDevice(String userId, String deviceId, PushPayload pushPayload) throws ClientException
      Triggers a notification to a single device, identified by userId and deviceId.
      Parameters:
      userId - userId
      deviceId - deviceId
      pushPayload - payload
      Returns:
      response
      Throws:
      ClientException
    • pushToDevice

      PushResponse pushToDevice(String userId, String deviceId, LocalizedPushPayload pushPayload) throws ClientException
      Triggers a notification to a single device, identified by userId and deviceId.
      Parameters:
      userId - userId
      deviceId - deviceId
      pushPayload - payload
      Returns:
      response
      Throws:
      ClientException
    • pushToUsers

      PushResponse pushToUsers(Collection<String> userIds, PushPayload pushPayload) throws ClientException
      Triggers a notification to a defined set of users, identified by their userId. If a single user has multiple devices registered, all devices will receive the notification.
      Parameters:
      userIds - userIds
      pushPayload - payload
      Returns:
      response
      Throws:
      ClientException
    • pushToUsers

      PushResponse pushToUsers(Collection<String> userIds, LocalizedPushPayload pushPayload) throws ClientException
      Triggers a notification to a defined set of users, identified by their userId. If a single user has multiple devices registered, all devices will receive the notification.
      Parameters:
      userIds - userIds
      pushPayload - payload
      Returns:
      response
      Throws:
      ClientException
    • pushToUsers

      PushResponse pushToUsers(Collection<String> userIds, Collection<String> userUUIDs, LocalizedPushPayload pushPayload) throws ClientException
      Triggers a notification to a defined set of users, identified by their userId or global user ID. If a single user has multiple devices registered, all devices will receive the notification.
      Parameters:
      userIds - userIds
      userUUIDs - userUUIDs
      pushPayload - payload
      Returns:
      response
      Throws:
      ClientException
    • pushToGroup

      PushResponse pushToGroup(String group, PushPayload pushPayload) throws ClientException
      Triggers a notification to a group with the same payload for all recipients.
      Parameters:
      group - group
      pushPayload - payload
      Returns:
      response
      Throws:
      ClientException
    • pushToGroup

      PushResponse pushToGroup(String group, LocalizedPushPayload pushPayload) throws ClientException
      Triggers a notification to a group with the same payload for all recipients.
      Parameters:
      group - group
      pushPayload - payload
      Returns:
      response
      Throws:
      ClientException
    • bulkPush

      PushResponse bulkPush(PushPayload rootNotification, Collection<UserNotification> userNotifications)
      Triggers a bulk of notifications. The notifications are temporarily queued before handed over to the push providers
      Parameters:
      rootNotification - fallback notification object
      userNotifications - user notification objects
      Returns:
      response
    • bulkPush

      PushResponse bulkPush(LocalizedPushPayload rootNotification, Collection<LocalizedUserNotification> userNotifications)
      Triggers notifications to device registrations with a capability and form factor.
      Parameters:
      rootNotification - fallback notification object
      userNotifications - user notification objects
      Returns:
      response
    • pushToCapability

      PushResponse pushToCapability(String capability, PushToCapabilitiesPayload pushToCapabilitiesPayload) throws ClientException
      Triggers notifications to devices that have been registered with a certain capability.
      Parameters:
      capability - capability
      pushToCapabilitiesPayload - payload
      Returns:
      response
      Throws:
      ClientException
    • pushToCapability

      PushResponse pushToCapability(String capability, LocalizedPushToCapabilitiesPayload pushToCapabilitiesPayload) throws ClientException
      Triggers notifications to devices that have been registered with a certain capability.
      Parameters:
      capability - capability
      pushToCapabilitiesPayload - payload
      Returns:
      response
      Throws:
      ClientException
    • pushToTopics

      PushResponse pushToTopics(Collection<String> userIds, Collection<String> topics, LocalizedPushPayload pushPayload)
      Triggers notifications to devices that have an active subscription for any of the given topic
      Parameters:
      userIds - optional filter on userIds
      topics - List of topics
      pushPayload - payload
      Returns:
    • pushToTopics

      PushResponse pushToTopics(Collection<String> userIds, Collection<String> userUUIDs, Collection<String> topics, LocalizedPushPayload pushPayload)
      Triggers notifications to devices that have an active subscription for any of the given topic
      Parameters:
      userIds - optional filter on userIds
      userUUIDs - optional filter on global user IDs
      topics - List of topics
      pushPayload - payload
      Returns:
    • getNotificationStatus

      NotificationStatusResponse getNotificationStatus(String notificationId)
      Retrieve the notification status by its ID.
      Parameters:
      notificationId - notificationId
      Returns:
      response
    • getLocalizations

      Set<String> getLocalizations(Collection<String> userIds)
      Retrieve the set of locales for a set of user ids and their registered locale. If userIds is null, all registered locales are returned.
      Parameters:
      userIds - userIds
      Returns:
      set of locales
    • getRegistration

      Optional<PushRegistration> getRegistration(String registrationId)
      Get a device registration by it's ID.
      Parameters:
      registrationId - ID of the registration
      Returns:
      Optional, which is empty, if no registration was found for the given ID.
    • getRegistrations

      default PushRegistrationsResponse getRegistrations()
      Get all registrations for a mobile application.
      Returns:
      List of registrations.
    • getRegistrationsByUsername

      default PushRegistrationsResponse getRegistrationsByUsername(String username)
      Get registrations by a username.
      Parameters:
      username - username to search registrations for.
      Returns:
      List of registrations.
    • getRegistrationsByGroup

      default PushRegistrationsResponse getRegistrationsByGroup(String group)
      Get registrations by a group.
      Parameters:
      group - group to search registrations for.
      Returns:
      List of registrations.
    • getRegistrations

      PushRegistrationsResponse getRegistrations(Optional<String> usernameOpt, Optional<String> groupOpt)
      Get registrations by optional username and/or optional group.
      Parameters:
      usernameOpt - optional username
      groupOpt - otpional group
      Returns:
      List of registrations.