Class PublishNotificationModule

  • All Implemented Interfaces:
    tigase.component.modules.Module

    @Bean(name="publish-notification",
          parent=PushNotificationsComponent.class,
          active=true)
    public class PublishNotificationModule
    extends tigase.component.modules.AbstractModule
    Created by andrzej on 02.01.2017.
    • Field Summary

      • Fields inherited from class tigase.component.modules.AbstractModule

        eventBus, log, writer
      • Fields inherited from interface tigase.component.modules.Module

        EMPTY_FEATURES
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String[] getFeatures()  
      tigase.criteria.Criteria getModuleCriteria()  
      protected IPushProvider getProvider​(IPushSettings.IDevice device)  
      protected java.util.Optional<INotification.Priority> guessPriority​(tigase.xml.Element notificationElem)  
      void handlePushNotificationException​(tigase.server.Packet packet, java.lang.Throwable ex)  
      protected tigase.xmpp.jid.JID parseJID​(tigase.xml.Element elem, java.lang.String field)  
      protected java.lang.Long parseLong​(tigase.xml.Element elem, java.lang.String field)  
      protected INotification parseNotification​(tigase.xmpp.jid.BareJID userJid, tigase.xml.Element notificationElem)  
      protected INotification.Priority parsePriority​(tigase.xml.Element notificationElem)  
      void process​(tigase.server.Packet packet)  
      protected java.util.concurrent.CompletableFuture<java.lang.String> pushNotification​(tigase.xmpp.jid.BareJID serviceJid, tigase.xmpp.jid.BareJID senderJid, java.lang.String node, tigase.xml.Element notificationElem)  
      void setPushProviders​(java.util.List<IPushProvider> pushProviders)  
      • Methods inherited from class tigase.component.modules.AbstractModule

        fireEvent, getEventBus, getWriter, setEventBus, setWriter, write, write
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface tigase.component.modules.Module

        canHandle
    • Constructor Detail

      • PublishNotificationModule

        public PublishNotificationModule()
    • Method Detail

      • getFeatures

        public java.lang.String[] getFeatures()
      • getModuleCriteria

        public tigase.criteria.Criteria getModuleCriteria()
      • process

        public void process​(tigase.server.Packet packet)
                     throws tigase.component.exceptions.ComponentException,
                            tigase.util.stringprep.TigaseStringprepException
        Throws:
        tigase.component.exceptions.ComponentException
        tigase.util.stringprep.TigaseStringprepException
      • handlePushNotificationException

        public void handlePushNotificationException​(tigase.server.Packet packet,
                                                    java.lang.Throwable ex)
      • setPushProviders

        public void setPushProviders​(java.util.List<IPushProvider> pushProviders)
      • pushNotification

        protected java.util.concurrent.CompletableFuture<java.lang.String> pushNotification​(tigase.xmpp.jid.BareJID serviceJid,
                                                                                            tigase.xmpp.jid.BareJID senderJid,
                                                                                            java.lang.String node,
                                                                                            tigase.xml.Element notificationElem)
                                                                                     throws tigase.component.exceptions.ComponentException,
                                                                                            tigase.util.stringprep.TigaseStringprepException,
                                                                                            tigase.component.exceptions.RepositoryException
        Throws:
        tigase.component.exceptions.ComponentException
        tigase.util.stringprep.TigaseStringprepException
        tigase.component.exceptions.RepositoryException
      • guessPriority

        protected java.util.Optional<INotification.Priority> guessPriority​(tigase.xml.Element notificationElem)
      • parseNotification

        protected INotification parseNotification​(tigase.xmpp.jid.BareJID userJid,
                                                  tigase.xml.Element notificationElem)
                                           throws tigase.component.exceptions.ComponentException,
                                                  tigase.util.stringprep.TigaseStringprepException
        Throws:
        tigase.component.exceptions.ComponentException
        tigase.util.stringprep.TigaseStringprepException
      • parseLong

        protected java.lang.Long parseLong​(tigase.xml.Element elem,
                                           java.lang.String field)
      • parseJID

        protected tigase.xmpp.jid.JID parseJID​(tigase.xml.Element elem,
                                               java.lang.String field)
                                        throws tigase.component.exceptions.ComponentException,
                                               tigase.util.stringprep.TigaseStringprepException
        Throws:
        tigase.component.exceptions.ComponentException
        tigase.util.stringprep.TigaseStringprepException