Package tigase.server.amp.db
Class MsgBroadcastRepository.MsgBroadcastRepositoryBean
java.lang.Object
tigase.db.beans.MDRepositoryBean<MsgBroadcastRepository>
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 ClassesModifier and TypeClassDescriptionstatic classNested 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 -
Method Summary
Modifier and TypeMethodDescriptionprotected Class<? extends MsgBroadcastRepository> findClassForDataSource(DataSource dataSource) Method returns class implementing repository which supports data source instance provided in parameter.Class<?> Returns default class for all bean which are defined using configuration as subbeans of bean implementing this interface.voidvoidsetDataSource(DataSource dataSource) Method called to provide class with instance of a data source.booleanupdateBroadcastMessage(String id, Element msg, Date expire, BareJID recipient) Methods inherited from class tigase.db.beans.MDRepositoryBeanWithStatistics
everyHour, everyMinute, everySecond, getRepositories, getRepository, getStatistics, setStatisticsEnabled, updateDataSourceAware, wrapInProxyMethods inherited from class tigase.db.beans.MDRepositoryBean
beforeUnregister, getName, initialize, initializeRepository, onDataSourceChange, register, registerIfNotExists, repositoriesStream, setDataSourceBean, unregisterMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface tigase.stats.ComponentStatisticsProvider
belongsTo
-
Constructor Details
-
MsgBroadcastRepositoryBean
public MsgBroadcastRepositoryBean()
-
-
Method Details
-
setDataSource
Description copied from interface:DataSourceAwareMethod called to provide class with instance of a data source.- Specified by:
setDataSourcein interfaceDataSourceAware
-
loadMessagesToBroadcast
public void loadMessagesToBroadcast()- Specified by:
loadMessagesToBroadcastin interfaceMsgBroadcastRepositoryIfc
-
getBroadcastMsg
- Specified by:
getBroadcastMsgin interfaceMsgBroadcastRepositoryIfc
-
dumpBroadcastMessageKeys
- Specified by:
dumpBroadcastMessageKeysin interfaceMsgBroadcastRepositoryIfc
-
getBroadcastMessages
- Specified by:
getBroadcastMessagesin interfaceMsgBroadcastRepositoryIfc
-
updateBroadcastMessage
- Specified by:
updateBroadcastMessagein interfaceMsgBroadcastRepositoryIfc
-
getDefaultBeanClass
Description copied from interface:RegistrarBeanWithDefaultBeanClassReturns 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:
getDefaultBeanClassin interfaceRegistrarBeanWithDefaultBeanClass
-
findClassForDataSource
protected Class<? extends MsgBroadcastRepository> findClassForDataSource(DataSource dataSource) throws DBInitException Description copied from class:MDRepositoryBeanMethod returns class implementing repository which supports data source instance provided in parameter.- Specified by:
findClassForDataSourcein classMDRepositoryBean<MsgBroadcastRepository>- Returns:
- repository class
- Throws:
DBInitException
-