Class GroupChatInvitation

  • All Implemented Interfaces:
    Element, ExtensionElement, FullyQualifiedElement, NamedElement, XmlLangElement

    public class GroupChatInvitation
    extends Object
    implements ExtensionElement
    A group chat invitation stanza extension, which is used to invite other users to a group chat room. To invite a user to a group chat room, address a new message to the user and set the room name appropriately, as in the following code example:
     Message message = new Message("");
     message.setBody("Join me for a group chat!");
     message.addExtension(new GroupChatInvitation(""););
    To listen for group chat invitations, use a StanzaExtensionFilter for the x element name and jabber:x:conference namespace, as in the following code example:
     PacketFilter filter = new StanzaExtensionFilter("x", "jabber:x:conference");
     // Create a stanza collector or stanza listeners using the filter...
    Note: this protocol is outdated now that the Multi-User Chat (MUC) XEP is available (XEP-45). However, most existing clients still use this older protocol. Once MUC support becomes more widespread, this API may be deprecated.