Package tigase.muc.history
Class DerbySqlHistoryProvider
java.lang.Object
tigase.muc.history.AbstractHistoryProvider<tigase.db.DataRepository>
tigase.muc.history.AbstractJDBCHistoryProvider
tigase.muc.history.DerbySqlHistoryProvider
- All Implemented Interfaces:
tigase.db.DataSourceAware<tigase.db.DataRepository>,HistoryProvider<tigase.db.DataRepository>
- Author:
- bmalkow
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class tigase.muc.history.AbstractJDBCHistoryProvider
ADD_MESSAGE_QUERY_KEY, dataRepository, DELETE_MESSAGES_QUERY_KEY, GET_MESSAGES_MAXSTANZAS_QUERY_KEY, GET_MESSAGES_SINCE_QUERY_KEYFields inherited from class tigase.muc.history.AbstractHistoryProvider
log, parser -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddJoinEvent(Room room, Date date, tigase.xmpp.jid.JID senderJID, String nickName) Adds join event.voidaddLeaveEvent(Room room, Date date, tigase.xmpp.jid.JID senderJID, String nickName) voidaddSubjectChange(Room room, tigase.xml.Element message, String subject, tigase.xmpp.jid.JID senderJid, String senderNickname, Date time) Adds subject changes to log/history.voidgetHistoryMessages(Room room, tigase.xmpp.jid.JID senderJID, Integer maxchars, Integer maxstanzas, Integer seconds, Date since, tigase.component.PacketWriter writer) voidinit(tigase.db.DataRepository dataRepository) protected voidprocessResultSet(Room room, tigase.xmpp.jid.JID senderJID, tigase.component.PacketWriter writer, Integer maxStanzas, ResultSet rs) voidsetDataSource(tigase.db.DataRepository dataRepository) Methods inherited from class tigase.muc.history.AbstractJDBCHistoryProvider
addMessage, destroy, isPersistent, processResultSet, removeHistoryMethods inherited from class tigase.muc.history.AbstractHistoryProvider
calculateOffsetAndPosition, createMessage, createMessageElement, isAllowedToSeeJIDs
-
Field Details
-
ADD_MESSAGE_QUERY_VAL
- See Also:
-
DELETE_MESSAGES_QUERY_VAL
- See Also:
-
GET_MESSAGES_MAXSTANZAS_QUERY_VAL
- See Also:
-
GET_MESSAGES_SINCE_QUERY_VAL
- See Also:
-
-
Constructor Details
-
DerbySqlHistoryProvider
public DerbySqlHistoryProvider()
-
-
Method Details
-
addJoinEvent
Adds join event. -
addLeaveEvent
-
addSubjectChange
public void addSubjectChange(Room room, tigase.xml.Element message, String subject, tigase.xmpp.jid.JID senderJid, String senderNickname, Date time) Adds subject changes to log/history. -
getHistoryMessages
public void getHistoryMessages(Room room, tigase.xmpp.jid.JID senderJID, Integer maxchars, Integer maxstanzas, Integer seconds, Date since, tigase.component.PacketWriter writer) - Specified by:
getHistoryMessagesin interfaceHistoryProvider<tigase.db.DataRepository>- Overrides:
getHistoryMessagesin classAbstractJDBCHistoryProvider
-
init
public void init(tigase.db.DataRepository dataRepository) -
setDataSource
public void setDataSource(tigase.db.DataRepository dataRepository) - Specified by:
setDataSourcein interfacetigase.db.DataSourceAware<tigase.db.DataRepository>- Overrides:
setDataSourcein classAbstractJDBCHistoryProvider
-
processResultSet
protected void processResultSet(Room room, tigase.xmpp.jid.JID senderJID, tigase.component.PacketWriter writer, Integer maxStanzas, ResultSet rs) throws SQLException, tigase.util.stringprep.TigaseStringprepException - Throws:
SQLExceptiontigase.util.stringprep.TigaseStringprepException
-