Class GroupChatInvitation

java.lang.Object
org.jivesoftware.smackx.muc.packet.GroupChatInvitation
All Implemented Interfaces:
Element, ExtensionElement, NamedElement, XmlElement, 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. This implementation now conforms to XEP-0249: Direct MUC Invitations, while staying backwards compatible to legacy MUC invitations.
  • Field Details

  • Constructor Details

    • GroupChatInvitation

      public GroupChatInvitation(EntityBareJid roomAddress)
      Creates a new group chat invitation to the specified room address. GroupChat room addresses are in the form room@service, where service is the name of group chat server, such as chat.example.com.
      Parameters:
      roomAddress - the address of the group chat room.
    • GroupChatInvitation

      public GroupChatInvitation(EntityBareJid roomAddress, String reason, String password, boolean continueAsOneToOneChat, String thread)
      Creates a new group chat invitation to the specified room address. GroupChat room addresses are in the form room@service, where service is the name of group chat server, such as chat.example.com.
      Parameters:
      roomAddress - the address of the group chat room.
      reason - the purpose for the invitation
      password - specifies a password needed for entry
      continueAsOneToOneChat - specifies if the groupchat room continues a one-to-one chat having the designated thread
      thread - the thread to continue
  • Method Details

    • getReason

      public String getReason()
      Returns the purpose for the invitation.
      Returns:
      the address of the group chat room.
    • getPassword

      public String getPassword()
      Returns the password needed for entry.
      Returns:
      the password needed for entry
    • getThread

      public String getThread()
      Returns the thread to continue.
      Returns:
      the thread to continue.
    • continueAsOneToOneChat

      public boolean continueAsOneToOneChat()
      Returns whether the groupchat room continues a one-to-one chat.
      Returns:
      whether the groupchat room continues a one-to-one chat.
    • getRoomAddress

      Returns the address of the group chat room. GroupChat room addresses are in the form room@service, where service is the name of group chat server, such as chat.example.com.
      Returns:
      the address of the group chat room.
    • getElementName

      Description copied from interface: NamedElement
      Returns the root element name.
      Specified by:
      getElementName in interface NamedElement
      Returns:
      the element name.
    • getNamespace

      public String getNamespace()
      Description copied from interface: XmlElement
      Returns the root element XML namespace.
      Specified by:
      getNamespace in interface XmlElement
      Returns:
      the namespace.
    • toXML

      public XmlStringBuilder toXML(XmlEnvironment enclosingNamespace)
      Specified by:
      toXML in interface Element
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • from

      public static GroupChatInvitation from(Stanza packet)
      Get the group chat invitation from the given stanza.
      Parameters:
      packet - TODO javadoc me please
      Returns:
      the GroupChatInvitation or null