private void store(Message message) {
        final OfflineMessage offlineMessage = messageStore.addMessage(message);
        // Inform listeners that an offline message was stored
        if (offlineMessage != null && !listeners.isEmpty()) {
            for (OfflineMessageListener listener : listeners) {
                try {
                    listener.messageStored(offlineMessage);
                } catch (Exception e) {
                    Log.warn("An exception occurred while dispatching a 'messageStored' event!", e);
                }
            }
        }
    }
Unregisters a listener to receive events.

@param listener the listener.
xmppserver/src/main/java/org/jivesoftware/openfire/OfflineMessageStrategy.java