Class GroupChatInvitation

java.lang.Object
org.jivesoftware.smackx.muc.packet.GroupChatInvitation
All Implemented Interfaces:
org.jivesoftware.smack.packet.Element, org.jivesoftware.smack.packet.ExtensionElement, org.jivesoftware.smack.packet.NamedElement, org.jivesoftware.smack.packet.XmlElement, org.jivesoftware.smack.packet.XmlLangElement

public class GroupChatInvitation extends Object implements org.jivesoftware.smack.packet.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(org.jxmpp.jid.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(org.jxmpp.jid.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

      public org.jxmpp.jid.EntityBareJid 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

      public String getElementName()
      Specified by:
      getElementName in interface org.jivesoftware.smack.packet.NamedElement
    • getNamespace

      public String getNamespace()
      Specified by:
      getNamespace in interface org.jivesoftware.smack.packet.XmlElement
    • toXML

      public org.jivesoftware.smack.util.XmlStringBuilder toXML(org.jivesoftware.smack.packet.XmlEnvironment enclosingNamespace)
      Specified by:
      toXML in interface org.jivesoftware.smack.packet.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(org.jivesoftware.smack.packet.Stanza packet)
      Get the group chat invitation from the given stanza.
      Parameters:
      packet - TODO javadoc me please
      Returns:
      the GroupChatInvitation or null