private IQ setActiveList(IQ packet, JID from, String listName) {
        IQ result = IQ.createResultIQ(packet);
        Element childElement = packet.getChildElement().createCopy();
        result.setChildElement(childElement);

        // Get the list
        PrivacyList list = manager.getPrivacyList(from.getNode(), listName);
        if (list != null) {
            // Get the user session
            ClientSession session = sessionManager.getSession(from);
            if (session != null) {
                // Set the new active list for this session
                session.setActiveList(list);
            }
        }
        else {
            // List not found
            result.setError(PacketError.Condition.item_not_found);
        }
        return result;
    }
User has specified a new active list that should be used for the current session.

@param packet IQ packet setting new active list for the current session.
@param from sender of the IQ packet.
@param listName name of the new active list for the current session.
@return acknowledge of success.
xmppserver/src/main/java/org/jivesoftware/openfire/handler/IQPrivacyHandler.java