Package tigase.muc.history
Class AbstractJDBCHistoryProvider
java.lang.Object
tigase.muc.history.AbstractHistoryProvider<tigase.db.DataRepository>
tigase.muc.history.AbstractJDBCHistoryProvider
- All Implemented Interfaces:
tigase.db.DataSourceAware<tigase.db.DataRepository>,HistoryProvider<tigase.db.DataRepository>
- Direct Known Subclasses:
DerbySqlHistoryProvider,MySqlHistoryProvider,PostgreSqlHistoryProvider,SqlserverSqlHistoryProvider
public abstract class AbstractJDBCHistoryProvider
extends AbstractHistoryProvider<tigase.db.DataRepository>
- Author:
- bmalkow
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprotected tigase.db.DataRepositorystatic final Stringstatic final Stringstatic final StringFields inherited from class tigase.muc.history.AbstractHistoryProvider
log, parser -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMessage(Room room, tigase.xml.Element message, String body, tigase.xmpp.jid.JID senderJid, String senderNickname, Date time) voiddestroy()Destroys this instance of HistoryProvider releasing all resources allocated but this provider if they should be releasedvoidgetHistoryMessages(Room room, tigase.xmpp.jid.JID senderJID, Integer maxchars, Integer maxstanzas, Integer seconds, Date since, tigase.component.PacketWriter writer) final booleanisPersistent(Room room) protected voidprocessResultSet(Room room, tigase.xmpp.jid.JID senderJID, tigase.component.PacketWriter writer, ResultSet rs) voidremoveHistory(Room room) voidsetDataSource(tigase.db.DataRepository dataSource) Methods inherited from class tigase.muc.history.AbstractHistoryProvider
calculateOffsetAndPosition, createMessage, createMessage, createMessageElement, isAllowedToSeeJIDs, parseMessageMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface tigase.muc.history.HistoryProvider
addJoinEvent, addLeaveEvent, addMessage, addSubjectChange
-
Field Details
-
ADD_MESSAGE_QUERY_KEY
- See Also:
-
DELETE_MESSAGES_QUERY_KEY
- See Also:
-
GET_MESSAGES_MAXSTANZAS_QUERY_KEY
- See Also:
-
GET_MESSAGES_SINCE_QUERY_KEY
- See Also:
-
dataRepository
protected tigase.db.DataRepository dataRepository
-
-
Constructor Details
-
AbstractJDBCHistoryProvider
public AbstractJDBCHistoryProvider()
-
-
Method Details
-
setDataSource
public void setDataSource(tigase.db.DataRepository dataSource) -
addMessage
-
destroy
public void destroy()Description copied from interface:HistoryProviderDestroys this instance of HistoryProvider releasing all resources allocated but this provider if they should be released -
getHistoryMessages
-
isPersistent
-
removeHistory
-
processResultSet
protected void processResultSet(Room room, tigase.xmpp.jid.JID senderJID, tigase.component.PacketWriter writer, ResultSet rs) throws SQLException, tigase.util.stringprep.TigaseStringprepException - Throws:
SQLExceptiontigase.util.stringprep.TigaseStringprepException
-