@Override
    public Iterator<DiscoItem> getItems(String name, String node, JID senderJID) {
        // Mark that offline messages shouldn't be sent when the user becomes available
        stopOfflineFlooding(senderJID);
        List<DiscoItem> answer = new ArrayList<>();
        for (OfflineMessage offlineMessage : messageStore.getMessages(senderJID.getNode(), false)) {
            answer.add(new DiscoItem(senderJID.asBareJID(), offlineMessage.getFrom().toString(),
                    XMPPDateTimeFormat.format(offlineMessage.getCreationDate()), null));
        }

        return answer.iterator();
    }
Implements JEP-0013: Flexible Offline Message Retrieval. Allows users to request number of
messages, request message headers, retrieve specific messages, remove specific messages,
retrieve all messages and remove all messages.

@author Gaston Dombiak
xmppserver/src/main/java/org/jivesoftware/openfire/handler/IQOfflineMessagesHandler.java