@Override
    public void serverStopping() {
        for (ClientSession session : XMPPServer.getInstance().getSessionManager().getSessions()) {
            if (!session.isAnonymousUser()) {
                try {
                    writeToDatabase(session.getUsername(), null, new Date());
                } catch (UserNotFoundException e) {
                    Log.error(e.getMessage(), e);
                }
            }
        }
    }
Loads offline presence data for the user into cache.

@param username the username.
xmppserver/src/main/java/org/jivesoftware/openfire/spi/PresenceManagerImpl.java