private static int marshallRolesToBroadcast(MUCRoom room) {
        final String buffer =
            (room.canBroadcastPresence(Role.moderator) ? "1" : "0") +
            (room.canBroadcastPresence(Role.participant) ? "1" : "0") +
            (room.canBroadcastPresence(Role.visitor) ? "1" : "0");
        return Integer.parseInt(buffer, 2);
    }
Returns an integer based on the binary representation of the roles to broadcast.

@param room the room to marshall its roles to broadcast.
@return an integer based on the binary representation of the roles to broadcast.
xmppserver/src/main/java/org/jivesoftware/openfire/muc/spi/MUCPersistenceManager.java