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
Fields Modifier and Type Field Description static java.lang.StringADD_MESSAGE_QUERY_KEYprotected tigase.db.DataRepositorydataRepositorystatic java.lang.StringDELETE_MESSAGES_QUERY_KEYstatic java.lang.StringGET_MESSAGES_MAXSTANZAS_QUERY_KEYstatic java.lang.StringGET_MESSAGES_SINCE_QUERY_KEY-
Fields inherited from class tigase.muc.history.AbstractHistoryProvider
log, parser
-
-
Constructor Summary
Constructors Constructor Description AbstractJDBCHistoryProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddMessage(Room room, tigase.xml.Element message, java.lang.String body, tigase.xmpp.jid.JID senderJid, java.lang.String senderNickname, java.util.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, java.lang.Integer maxchars, java.lang.Integer maxstanzas, java.lang.Integer seconds, java.util.Date since, tigase.component.PacketWriter writer)booleanisPersistent(Room room)protected voidprocessResultSet(Room room, tigase.xmpp.jid.JID senderJID, tigase.component.PacketWriter writer, java.sql.ResultSet rs)voidremoveHistory(Room room)voidsetDataSource(tigase.db.DataRepository dataSource)-
Methods inherited from class tigase.muc.history.AbstractHistoryProvider
calculateOffsetAndPosition, createMessage, createMessageElement, isAllowedToSeeJIDs
-
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, addSubjectChange
-
-
-
-
Field Detail
-
ADD_MESSAGE_QUERY_KEY
public static final java.lang.String ADD_MESSAGE_QUERY_KEY
- See Also:
- Constant Field Values
-
DELETE_MESSAGES_QUERY_KEY
public static final java.lang.String DELETE_MESSAGES_QUERY_KEY
- See Also:
- Constant Field Values
-
GET_MESSAGES_MAXSTANZAS_QUERY_KEY
public static final java.lang.String GET_MESSAGES_MAXSTANZAS_QUERY_KEY
- See Also:
- Constant Field Values
-
GET_MESSAGES_SINCE_QUERY_KEY
public static final java.lang.String GET_MESSAGES_SINCE_QUERY_KEY
- See Also:
- Constant Field Values
-
dataRepository
protected tigase.db.DataRepository dataRepository
-
-
Method Detail
-
setDataSource
public void setDataSource(tigase.db.DataRepository dataSource)
-
addMessage
public void addMessage(Room room, tigase.xml.Element message, java.lang.String body, tigase.xmpp.jid.JID senderJid, java.lang.String senderNickname, java.util.Date time)
-
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
public void getHistoryMessages(Room room, tigase.xmpp.jid.JID senderJID, java.lang.Integer maxchars, java.lang.Integer maxstanzas, java.lang.Integer seconds, java.util.Date since, tigase.component.PacketWriter writer)
-
isPersistent
public final boolean isPersistent(Room room)
-
removeHistory
public void removeHistory(Room room)
-
processResultSet
protected void processResultSet(Room room, tigase.xmpp.jid.JID senderJID, tigase.component.PacketWriter writer, java.sql.ResultSet rs) throws java.sql.SQLException, tigase.util.stringprep.TigaseStringprepException
- Throws:
java.sql.SQLExceptiontigase.util.stringprep.TigaseStringprepException
-
-