Package 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
Modifier and TypeClassDescriptionstatic class
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
-
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.void
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 Details
-
MsgBroadcastRepositoryBean
public MsgBroadcastRepositoryBean()
-
-
Method Details
-
setDataSource
Description copied from interface:DataSourceAware
Method called to provide class with instance of a data source.- Specified by:
setDataSource
in interfaceDataSourceAware
-
loadMessagesToBroadcast
public void loadMessagesToBroadcast()- Specified by:
loadMessagesToBroadcast
in interfaceMsgBroadcastRepositoryIfc
-
getBroadcastMsg
- Specified by:
getBroadcastMsg
in interfaceMsgBroadcastRepositoryIfc
-
dumpBroadcastMessageKeys
- Specified by:
dumpBroadcastMessageKeys
in interfaceMsgBroadcastRepositoryIfc
-
getBroadcastMessages
- Specified by:
getBroadcastMessages
in interfaceMsgBroadcastRepositoryIfc
-
updateBroadcastMessage
- Specified by:
updateBroadcastMessage
in interfaceMsgBroadcastRepositoryIfc
-
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 interfaceRegistrarBeanWithDefaultBeanClass
-
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 classMDRepositoryBean<MsgBroadcastRepository>
- Returns:
- repository class
- Throws:
DBInitException
-