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
Modifier and TypeFieldDescriptionstatic final String
protected tigase.db.DataRepository
static final String
static final String
static final String
Fields inherited from class tigase.muc.history.AbstractHistoryProvider
log, parser
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addMessage
(Room room, tigase.xml.Element message, String body, tigase.xmpp.jid.JID senderJid, String senderNickname, Date time) void
destroy()
Destroys this instance of HistoryProvider releasing all resources allocated but this provider if they should be releasedvoid
getHistoryMessages
(Room room, tigase.xmpp.jid.JID senderJID, Integer maxchars, Integer maxstanzas, Integer seconds, Date since, tigase.component.PacketWriter writer) final boolean
isPersistent
(Room room) protected void
processResultSet
(Room room, tigase.xmpp.jid.JID senderJID, tigase.component.PacketWriter writer, ResultSet rs) void
removeHistory
(Room room) void
setDataSource
(tigase.db.DataRepository dataSource) Methods inherited from class tigase.muc.history.AbstractHistoryProvider
calculateOffsetAndPosition, createMessage, createMessage, createMessageElement, isAllowedToSeeJIDs, parseMessage
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:HistoryProvider
Destroys 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:
SQLException
tigase.util.stringprep.TigaseStringprepException
-