public void lock(MUCOccupant actor) throws ForbiddenException {
        if (Affiliation.owner != actor.getAffiliation()) {
            throw new ForbiddenException();
        }
        if (isLocked()) {
            // Do nothing if the room was already locked
            return;
        }
        setLocked(true);
    }
Locks the room so that users cannot join the room. Only the owner of the room can lock/unlock
the room.

@param actor the occupant data of the user that locked the room.
@throws ForbiddenException If the user is not an owner of the room.
xmppserver/src/main/java/org/jivesoftware/openfire/muc/MUCRoom.java