public boolean isAnonymousClientSession(@Nonnull final String username) {
        // JID's node and resource are the same for anonymous sessions
        final JID address = new JID(username, serverName, username, true);
        return isAnonymousClientSession(address);
    }
Change the priority of a session, that was already available, associated with the sender.

@param session   The session whose presence priority has been modified
@param oldPriority The old priority for the session
xmppserver/src/main/java/org/jivesoftware/openfire/SessionManager.java