Class JDBCPushRepository

  • All Implemented Interfaces:
    tigase.db.DataSourceAware<tigase.db.DataRepository>, tigase.db.util.RepositoryVersionAware, IPushRepository<tigase.db.DataRepository>

    public class JDBCPushRepository
    extends AbstractPushRepository<tigase.db.DataRepository>
    implements tigase.db.util.RepositoryVersionAware
    Created by andrzej on 05.01.2017.
    • Field Detail

      • repo

        protected tigase.db.DataRepository repo
    • Constructor Detail

      • JDBCPushRepository

        public JDBCPushRepository()
    • Method Detail

      • 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<tigase.db.DataRepository>
        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<tigase.db.DataRepository>
        Throws:
        tigase.component.exceptions.RepositoryException
        tigase.component.exceptions.ComponentException
      • unregisterDeviceOld

        public IPushSettings unregisterDeviceOld​(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
        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<tigase.db.DataRepository>
        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<tigase.db.DataRepository>
        Throws:
        tigase.component.exceptions.RepositoryException
      • getStatistics

        public java.util.Map<java.lang.String,​IPushRepository.Statistics> getStatistics()
                                                                                       throws tigase.component.exceptions.RepositoryException
        Specified by:
        getStatistics in interface IPushRepository<tigase.db.DataRepository>
        Throws:
        tigase.component.exceptions.RepositoryException
      • setDataSource

        public void setDataSource​(tigase.db.DataRepository dataSource)
        Specified by:
        setDataSource in interface tigase.db.DataSourceAware<tigase.db.DataRepository>
      • readDevice

        protected IPushSettings.IDevice readDevice​(java.sql.ResultSet rs,
                                                   int i)
                                            throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • initRepo

        protected void initRepo​(tigase.db.DataRepository repo)
                         throws java.sql.SQLException
        Throws:
        java.sql.SQLException