tigase.server.amp.db

## Class MsgBroadcastRepository.MsgBroadcastRepositoryBean

- java.lang.Object
- - tigase.db.beans.MDRepositoryBean<T>
  - - tigase.db.beans.MDRepositoryBeanWithStatistics<MsgBroadcastRepository>
    - - tigase.server.amp.db.MsgBroadcastRepository.MsgBroadcastRepositoryBean

- All Implemented Interfaces:
    DataSourceAware, Initializable, RegistrarBean, RegistrarBeanWithDefaultBeanClass, UnregisterAware, MsgBroadcastRepositoryIfc, ComponentStatisticsProvider, StatisticsProviderIfc
  Enclosing class:
    MsgBroadcastRepository<T,S extends DataSource>

      @Bean(name="msgBroadcastRepository",
            parent=AmpComponent.class,
            active=true)
      public static class MsgBroadcastRepository.MsgBroadcastRepositoryBean
      extends MDRepositoryBeanWithStatistics<MsgBroadcastRepository>
      implements MsgBroadcastRepositoryIfc

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `MsgBroadcastRepository.MsgBroadcastRepositoryBean.MsgBroadcastRepositoryConfigBean`

    - ### Nested classes/interfaces inherited from class tigase.db.beans.MDRepositoryBean

      `MDRepositoryBean.MDRepositoryConfigBean<A extends DataSourceAware>, MDRepositoryBean.SelectorType`

  - ### Field Summary

    - ### Fields inherited from class tigase.db.beans.MDRepositoryBean

      `aliases, dataSourceSelection`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MsgBroadcastRepositoryBean()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `dumpBroadcastMessageKeys()`
    `protected Class<? extends MsgBroadcastRepository>` | `findClassForDataSource(DataSource dataSource)` Method returns class implementing repository which supports data source instance provided in parameter.
    `Collection<MsgBroadcastRepository.BroadcastMsg>` | `getBroadcastMessages()`
    `MsgBroadcastRepository.BroadcastMsg` | `getBroadcastMsg(String id)`
    `Class<?>` | `getDefaultBeanClass()` Returns default class for all bean which are defined using configuration as subbeans of bean implementing this interface.
    `void` | `loadMessagesToBroadcast()`
    `void` | `setDataSource(DataSource dataSource)` Method called to provide class with instance of a data source.
    `boolean` | `updateBroadcastMessage(String id, Element msg, Date expire, BareJID recipient)`

    - ### 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

    - #### MsgBroadcastRepositoryBean

          public MsgBroadcastRepositoryBean()

  - ### Method Detail

    - #### setDataSource

          public void setDataSource(DataSource dataSource)

      Description copied from interface: `DataSourceAware`
      Method called to provide class with instance of a data source.
      Specified by:
        `setDataSource` in interface `DataSourceAware`

    - #### loadMessagesToBroadcast

          public void loadMessagesToBroadcast()

      Specified by:
        `loadMessagesToBroadcast` in interface `MsgBroadcastRepositoryIfc`

    - #### getBroadcastMsg

          public MsgBroadcastRepository.BroadcastMsg getBroadcastMsg(String id)

      Specified by:
        `getBroadcastMsg` in interface `MsgBroadcastRepositoryIfc`

    - #### dumpBroadcastMessageKeys

          public String dumpBroadcastMessageKeys()

      Specified by:
        `dumpBroadcastMessageKeys` in interface `MsgBroadcastRepositoryIfc`

    - #### getBroadcastMessages

          public Collection<MsgBroadcastRepository.BroadcastMsg> getBroadcastMessages()

      Specified by:
        `getBroadcastMessages` in interface `MsgBroadcastRepositoryIfc`

    - #### updateBroadcastMessage

          public boolean updateBroadcastMessage(String id,
                                                Element msg,
                                                Date expire,
                                                BareJID recipient)

      Specified by:
        `updateBroadcastMessage` in interface `MsgBroadcastRepositoryIfc`

    - #### getDefaultBeanClass

          public Class<?> getDefaultBeanClass()

      Description copied from interface: `RegistrarBeanWithDefaultBeanClass`
      Returns default class for all bean which are defined using configuration as subbeans of bean implementing this interface. This allows users to have more convenient configuration file without the need to specify class for each of subbbeans if most of them will have the same class.
      Specified by:
        `getDefaultBeanClass` in interface `RegistrarBeanWithDefaultBeanClass`

    - #### findClassForDataSource

          protected Class<? extends MsgBroadcastRepository> findClassForDataSource(DataSource dataSource)
                                                                            throws DBInitException

      Description copied from class: `MDRepositoryBean`
      Method returns class implementing repository which supports data source instance provided in parameter.
      Specified by:
        `findClassForDataSource` in class `MDRepositoryBean<MsgBroadcastRepository>`
      Returns:
        repository class
      Throws:
        `DBInitException`

Copyright © 2004–2020 "Tigase, Inc.". All rights reserved.