Package tigase.push.modules
Class PublishNotificationModule
- java.lang.Object
-
- tigase.component.modules.AbstractModule
-
- tigase.push.modules.PublishNotificationModule
-
- All Implemented Interfaces:
tigase.component.modules.Module
@Bean(name="publish-notification", parent=PushNotificationsComponent.class, active=true) public class PublishNotificationModule extends tigase.component.modules.AbstractModuleCreated by andrzej on 02.01.2017.
-
-
Constructor Summary
Constructors Constructor Description PublishNotificationModule()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String[]getFeatures()tigase.criteria.CriteriagetModuleCriteria()protected IPushProvidergetProvider(IPushSettings.IDevice device)protected java.util.Optional<INotification.Priority>guessPriority(tigase.xml.Element notificationElem)voidhandlePushNotificationException(tigase.server.Packet packet, java.lang.Throwable ex)protected tigase.xmpp.jid.JIDparseJID(tigase.xml.Element elem, java.lang.String field)protected java.lang.LongparseLong(tigase.xml.Element elem, java.lang.String field)protected INotificationparseNotification(tigase.xmpp.jid.BareJID userJid, tigase.xml.Element notificationElem)protected INotification.PriorityparsePriority(tigase.xml.Element notificationElem)voidprocess(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)voidsetPushProviders(java.util.List<IPushProvider> pushProviders)-
Methods inherited from class tigase.component.modules.AbstractModule
fireEvent, getEventBus, getWriter, setEventBus, setWriter, write, write
-
-
-
-
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.ComponentExceptiontigase.util.stringprep.TigaseStringprepException
-
handlePushNotificationException
public void handlePushNotificationException(tigase.server.Packet packet, java.lang.Throwable ex)
-
setPushProviders
public void setPushProviders(java.util.List<IPushProvider> pushProviders)
-
getProvider
protected IPushProvider getProvider(IPushSettings.IDevice device)
-
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.ComponentExceptiontigase.util.stringprep.TigaseStringprepExceptiontigase.component.exceptions.RepositoryException
-
guessPriority
protected java.util.Optional<INotification.Priority> guessPriority(tigase.xml.Element notificationElem)
-
parsePriority
protected INotification.Priority parsePriority(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.ComponentExceptiontigase.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.ComponentExceptiontigase.util.stringprep.TigaseStringprepException
-
-