public void setAllowToDiscoverMembersOnlyRooms(final boolean allowToDiscoverMembersOnlyRooms) {
        this.allowToDiscoverMembersOnlyRooms = allowToDiscoverMembersOnlyRooms;
        MUCPersistenceManager.setProperty(chatServiceName, "discover.membersOnly",
            Boolean.toString(allowToDiscoverMembersOnlyRooms));
    }
Sets the flag that indicates if the service should provide information about non-public
members-only rooms when handling service discovery requests.

@param allowToDiscoverMembersOnlyRooms
        if the service should provide information about
        non-public members-only rooms.
xmppserver/src/main/java/org/jivesoftware/openfire/muc/spi/MultiUserChatServiceImpl.java