Class PushRepositoryMDBean

  • All Implemented Interfaces:
    tigase.db.DataSourceAware, tigase.kernel.beans.Initializable, tigase.kernel.beans.RegistrarBean, tigase.kernel.beans.RegistrarBeanWithDefaultBeanClass, tigase.kernel.beans.UnregisterAware, IPushRepository, tigase.stats.ComponentStatisticsProvider, tigase.stats.StatisticsProviderIfc

    @Bean(name="pushRepository",
          parent=PushNotificationsComponent.class,
          active=true)
    public class PushRepositoryMDBean
    extends tigase.db.beans.MDRepositoryBeanWithStatistics<IPushRepository>
    implements IPushRepository
    Created by andrzej on 05.01.2017.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  PushRepositoryMDBean.PushRepositoryConfigBean  
      • Nested classes/interfaces inherited from class tigase.db.beans.MDRepositoryBean

        tigase.db.beans.MDRepositoryBean.MDRepositoryConfigBean<A extends tigase.db.DataSourceAware>, tigase.db.beans.MDRepositoryBean.SelectorType
    • Field Summary

      • Fields inherited from class tigase.db.beans.MDRepositoryBean

        aliases, dataSourceSelection
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.lang.Class<? extends IPushRepository> findClassForDataSource​(tigase.db.DataSource dataSource)  
      java.lang.Class<?> getDefaultBeanClass()  
      java.util.stream.Stream<IPushSettings> getNodeSettings​(java.lang.String provider, java.lang.String deviceId)  
      IPushSettings getNodeSettings​(tigase.xmpp.jid.BareJID serviceJid, java.lang.String node)  
      java.util.stream.Stream<IPushSettings> getNodeSettings​(tigase.xmpp.jid.BareJID userJid, java.lang.String provider, java.lang.String deviceId)  
      IPushSettings registerDevice​(tigase.xmpp.jid.BareJID serviceJid, tigase.xmpp.jid.BareJID userJid, java.lang.String provider, java.lang.String deviceId, java.lang.String deviceSecondId)  
      void setDataSource​(tigase.db.DataSource dataSource)  
      IPushSettings unregisterDevice​(tigase.xmpp.jid.BareJID serviceJid, tigase.xmpp.jid.BareJID userJid, java.lang.String provider, java.lang.String deviceId)  
      • Methods inherited from class tigase.db.beans.MDRepositoryBeanWithStatistics

        everyHour, everyMinute, everySecond, getRepositories, getRepository, getStatistics, setStatisticsEnabled, updateDataSourceAware, wrapInProxy
      • Methods inherited from class tigase.db.beans.MDRepositoryBean

        beforeUnregister, getName, initialize, initializeRepository, onDataSourceChange, register, registerIfNotExists, repositoriesStream, setDataSourceBean, unregister
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface tigase.stats.ComponentStatisticsProvider

        belongsTo
    • Constructor Detail

      • PushRepositoryMDBean

        public PushRepositoryMDBean()
    • Method Detail

      • getDefaultBeanClass

        public java.lang.Class<?> getDefaultBeanClass()
        Specified by:
        getDefaultBeanClass in interface tigase.kernel.beans.RegistrarBeanWithDefaultBeanClass
      • registerDevice

        public IPushSettings registerDevice​(tigase.xmpp.jid.BareJID serviceJid,
                                            tigase.xmpp.jid.BareJID userJid,
                                            java.lang.String provider,
                                            java.lang.String deviceId,
                                            java.lang.String deviceSecondId)
                                     throws tigase.component.exceptions.RepositoryException
        Specified by:
        registerDevice in interface IPushRepository
        Throws:
        tigase.component.exceptions.RepositoryException
      • unregisterDevice

        public IPushSettings unregisterDevice​(tigase.xmpp.jid.BareJID serviceJid,
                                              tigase.xmpp.jid.BareJID userJid,
                                              java.lang.String provider,
                                              java.lang.String deviceId)
                                       throws tigase.component.exceptions.RepositoryException,
                                              tigase.component.exceptions.ComponentException
        Specified by:
        unregisterDevice in interface IPushRepository
        Throws:
        tigase.component.exceptions.RepositoryException
        tigase.component.exceptions.ComponentException
      • getNodeSettings

        public IPushSettings getNodeSettings​(tigase.xmpp.jid.BareJID serviceJid,
                                             java.lang.String node)
                                      throws tigase.component.exceptions.RepositoryException
        Specified by:
        getNodeSettings in interface IPushRepository
        Throws:
        tigase.component.exceptions.RepositoryException
      • getNodeSettings

        public java.util.stream.Stream<IPushSettings> getNodeSettings​(tigase.xmpp.jid.BareJID userJid,
                                                                      java.lang.String provider,
                                                                      java.lang.String deviceId)
                                                               throws tigase.component.exceptions.RepositoryException
        Specified by:
        getNodeSettings in interface IPushRepository
        Throws:
        tigase.component.exceptions.RepositoryException
      • getNodeSettings

        public java.util.stream.Stream<IPushSettings> getNodeSettings​(java.lang.String provider,
                                                                      java.lang.String deviceId)
                                                               throws tigase.component.exceptions.RepositoryException
        Specified by:
        getNodeSettings in interface IPushRepository
        Throws:
        tigase.component.exceptions.RepositoryException
      • setDataSource

        public void setDataSource​(tigase.db.DataSource dataSource)
        Specified by:
        setDataSource in interface tigase.db.DataSourceAware
      • findClassForDataSource

        protected java.lang.Class<? extends IPushRepository> findClassForDataSource​(tigase.db.DataSource dataSource)
                                                                             throws tigase.db.DBInitException
        Specified by:
        findClassForDataSource in class tigase.db.beans.MDRepositoryBean<IPushRepository>
        Throws:
        tigase.db.DBInitException