Hi Gene, it's the best approach there is.
(Side note: I'm not particulary fond of private fields in Java, using protected whenever possible. If Room.history would have been protected, your code could have been a little bit more elegant.) Bernd On Fri, May 31, 2013 at 1:05 AM, Gene McCulley <[email protected]>wrote: > What would be a good approach for permanently archiving discussion history > in a chat room? I'm currently implementing RoomStorageProvider just so I > can replace DiscussionHistory with a subclass in a Room. This does not feel > like the right approach. > > I looked for some way to intercept stanzas or add a listener to a > StanzaRelay, but saw no clear way. > > You can see my current implementation at > https://github.com/StackFrame/sarariman/blob/master/src/java/com/stackframe/sarariman/xmpp/vysper/ArchivedRoomStorageProvider.java, > https://github.com/StackFrame/sarariman/blob/master/src/java/com/stackframe/sarariman/xmpp/vysper/ArchivedRoom.java, > and > https://github.com/StackFrame/sarariman/blob/master/src/java/com/stackframe/sarariman/xmpp/vysper/ArchivedDiscussionHistory.java > > -- > Gene McCulley > StackFrame, LLC > [email protected] > http://www.stackframe.com/ > phone: 407-733-0885 > fax: 321-256-2962 > LinkedIn: http://www.linkedin.com/in/mcculley > Twitter: https://twitter.com/mcculley > Skype: genemcculley > 114 W. 1st Street, Suite 246, Sanford, FL 32771 > > > >
