@Override
    public void availableSession(ClientSession session, Presence presence) {
        // Do nothing if server is not enabled
        if (!ENABLED.getValue()) {
            return;
        }
        JID newlyAvailableJID = presence.getFrom();

        if (newlyAvailableJID == null) {
            return;
        }
        
        final GetNotificationsOnInitialPresence task = new GetNotificationsOnInitialPresence(newlyAvailableJID);
        executor.submit(task);
    }
Implements UserItemsProvider, adding PEP related items to a disco#items
result.
xmppserver/src/main/java/org/jivesoftware/openfire/pep/IQPEPHandler.java