Package tigase.server.amp.db
Class MsgBroadcastRepository<T,S extends DataSource>
- java.lang.Object
-
- tigase.server.amp.db.MsgBroadcastRepository<T,S>
-
- All Implemented Interfaces:
DataSourceAware<S>
- Direct Known Subclasses:
JDBCMsgBroadcastRepository
public abstract class MsgBroadcastRepository<T,S extends DataSource> extends Object implements DataSourceAware<S>
Created by andrzej on 15.03.2016.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classMsgBroadcastRepository.BroadcastMsg<T>static classMsgBroadcastRepository.MsgBroadcastRepositoryBean
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,MsgBroadcastRepository.BroadcastMsg>broadcastMessagesprotected longbroadcastMessagesLastCleanupprotected SimpleParserparser
-
Constructor Summary
Constructors Constructor Description MsgBroadcastRepository()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description StringdumpBroadcastMessageKeys()protected abstract voidensureBroadcastMessageRecipient(String id, BareJID recipient)Collection<MsgBroadcastRepository.BroadcastMsg>getBroadcastMessages()MsgBroadcastRepository.BroadcastMsggetBroadcastMsg(String id)protected abstract voidinsertBroadcastMessage(String id, Element msg, Date expire, BareJID recipient)abstract voidloadMessagesToBroadcast()booleanupdateBroadcastMessage(String id, Element msg, Date expire, BareJID recipient)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface tigase.db.DataSourceAware
setDataSource
-
-
-
-
Field Detail
-
broadcastMessages
protected Map<String,MsgBroadcastRepository.BroadcastMsg> broadcastMessages
-
broadcastMessagesLastCleanup
protected long broadcastMessagesLastCleanup
-
parser
protected SimpleParser parser
-
-
Method Detail
-
loadMessagesToBroadcast
public abstract void loadMessagesToBroadcast()
-
getBroadcastMsg
public MsgBroadcastRepository.BroadcastMsg getBroadcastMsg(String id)
-
dumpBroadcastMessageKeys
public String dumpBroadcastMessageKeys()
-
getBroadcastMessages
public Collection<MsgBroadcastRepository.BroadcastMsg> getBroadcastMessages()
-
updateBroadcastMessage
public boolean updateBroadcastMessage(String id, Element msg, Date expire, BareJID recipient)
-
ensureBroadcastMessageRecipient
protected abstract void ensureBroadcastMessageRecipient(String id, BareJID recipient)
-
-