Class PushNotificationManager

java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.mobileapp.PushNotificationManager
All Implemented Interfaces:
LogEnabled, Component, Serviceable

Manager to push notifications to users
  • Field Details

  • Constructor Details

  • Method Details

    • service

      public void service(ServiceManager manager) throws ServiceException
      Specified by:
      service in interface Serviceable
      Throws:
      ServiceException
    • pushNotifications

      public void pushNotifications(String title, String message, List<UserIdentity> users, Map<String,Object> data) throws io.github.jav.exposerversdk.PushClientException, SchedulerException
      Push a notification to all the registered devices of the users
      Parameters:
      title - title of the message
      message - message to send
      users - list users to notify
      data - the data to push
      Throws:
      io.github.jav.exposerversdk.PushClientException - something went wrong creating the push client
      SchedulerException - an exception occurs setting up the scheduler for checking push receipts
    • pushNotifications

      public void pushNotifications(String title, String message, Map<UserIdentity,Set<String>> tokens, Map<String,Object> data) throws io.github.jav.exposerversdk.PushClientException, SchedulerException
      Push a notification to a list of registered devices
      Parameters:
      title - title of the message
      message - message to send
      tokens - list of device tokens
      data - the data to push
      Throws:
      io.github.jav.exposerversdk.PushClientException - something went wrong creating the push client
      SchedulerException - an exception occurs setting up the scheduler for checking push receipts
    • checkTickets

      public void checkTickets(String reference) throws Exception
      Check the status of previously sent push notifications by their in-memory reference
      Parameters:
      reference - the reference of tickets to check
      Throws:
      Exception - something went wrong while checking the tickets