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.AbstractModule
Created by andrzej on 02.01.2017.
-
Field Summary
Fields inherited from class tigase.component.modules.AbstractModule
eventBus, log, writerFields inherited from interface tigase.component.modules.Module
EMPTY_FEATURES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionString[]tigase.criteria.Criteriaprotected IPushProvidergetProvider(IPushSettings.IDevice device) protected Optional<INotification.Priority> guessPriority(tigase.xml.Element notificationElem) voidhandlePushNotificationException(tigase.server.Packet packet, Throwable ex) voidonUserRemoval(tigase.db.UserRepository.UserRemovedEvent event) protected tigase.xmpp.jid.JIDprotected INotification.JingleparseJingle(tigase.xml.Element notificationElem) protected Longprotected INotification.MeetparseMeet(tigase.xml.Element notificationElem) protected INotificationparseNotification(tigase.xmpp.jid.BareJID userJid, tigase.xml.Element notificationElem) protected INotification.PriorityparsePriority(tigase.xml.Element notificationElem) voidprocess(tigase.server.Packet packet) protected CompletableFuture<String> pushNotification(tigase.xmpp.jid.BareJID serviceJid, tigase.xmpp.jid.BareJID senderJid, String node, tigase.xml.Element notificationElem) voidsetPushProviders(List<IPushProvider> pushProviders) Methods inherited from class tigase.component.modules.AbstractModule
fireEvent, getEventBus, getWriter, setEventBus, setWriter, write, writeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface tigase.component.modules.Module
canHandle
-
Constructor Details
-
PublishNotificationModule
public PublishNotificationModule()
-
-
Method Details
-
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
-
setPushProviders
-
onUserRemoval
@HandleEvent public void onUserRemoval(tigase.db.UserRepository.UserRemovedEvent event) -
getProvider
-
pushNotification
protected CompletableFuture<String> pushNotification(tigase.xmpp.jid.BareJID serviceJid, tigase.xmpp.jid.BareJID senderJid, 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
-
parsePriority
-
parseJingle
-
parseMeet
-
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
-
parseJID
protected tigase.xmpp.jid.JID parseJID(tigase.xml.Element elem, String field) throws tigase.component.exceptions.ComponentException, tigase.util.stringprep.TigaseStringprepException - Throws:
tigase.component.exceptions.ComponentExceptiontigase.util.stringprep.TigaseStringprepException
-