Package org.xmpp.muc

Class RoomConfiguration


  • @NotThreadSafe
    public class RoomConfiguration
    extends IQ
    RoomConfiguration is a packet that helps to set the configuration of MUC rooms. RoomConfiguration is a speacial IQ packet whose child element contains a data form. The data form holds the fields to set together with a list of values.

    Code example:

     
     // Set the fields and the values.
     Map<String,Collection<String>> fields = new HashMap<String,Collection<String>>();
     // Make a non-public room
     List<String> values = new ArrayList<String>();
     values.add("0");
     fields.put("muc#roomconfig_publicroom", values);
    
     // Create a RoomConfiguration with the fields and values
     RoomConfiguration conf = new RoomConfiguration(fields);
     conf.setTo("room@conference.jabber.org");
     conf.setFrom("john@jabber.org/notebook");
    
     component.sendPacket(conf);
     
     
    Author:
    Gaston Dombiak
    • Constructor Detail

      • RoomConfiguration

        public RoomConfiguration​(Map<String,​Collection<String>> fieldValues)
        Creates a new IQ packet that contains the field and values to send for setting the room configuration.
        Parameters:
        fieldValues - the list of fields associated with the list of values.