Dashboard > Openfire > Home > Listen to offline message events
  Openfire Log In View a printable version of the current page.  
  Listen to offline message events
Added by Gaston Dombiak, last edited by Gaston Dombiak on Jan 22, 2007
Labels: 
(None)

This document explains how to hook up customer logic when a message is stored offline or bounced (i.e. not stored offline and the target entity was not available).

  1. Create your own plugin where you will place your custom code.
  2. Create a new implementation of the OfflineMessageListener interface.
  3. Register the new interface implementation so that it will be alerted of new events. Use OfflineMessageStrategy#addListener(OfflineMessageListener) to register the new listener.
  4. When your pluing is unloaded you will need to unregister your listener so that no references to the plugin are kept. Use OfflineMessageStrategy#removeListener(OfflineMessageListener) to unregister the listener.

There is only one instance of OfflineMessageStrategy in the system. Use XMPPServer.getInstance().getOfflineMessageStrategy() to get the unique instance and add or remove your listeners.

Site powered by a free Open Source Project / Non-profit License (more) of Confluence - the Enterprise wiki.
Learn more or evaluate Confluence for your organisation.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.3.3 Build:#645 Feb 13, 2007) - Bug/feature request - Contact Administrators