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 Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionGroupChatInvitation(org.jxmpp.jid.EntityBareJid roomAddress) Creates a new group chat invitation to the specified room address.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. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether the groupchat room continues a one-to-one chat.booleanstatic GroupChatInvitationfrom(org.jivesoftware.smack.packet.Stanza packet) Get the group chat invitation from the given stanza.Returns the password needed for entry.Returns the purpose for the invitation.org.jxmpp.jid.EntityBareJidReturns the address of the group chat room.Returns the thread to continue.inthashCode()org.jivesoftware.smack.util.XmlStringBuildertoXML(org.jivesoftware.smack.packet.XmlEnvironment enclosingNamespace) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jivesoftware.smack.packet.Element
toXML, toXMLMethods inherited from interface org.jivesoftware.smack.packet.XmlElement
getLanguage, getQName
-
Field Details
-
ELEMENT
Element name of the stanza extension.- See Also:
-
NAMESPACE
Namespace of the stanza extension.- See Also:
-
QNAME
-
ATTR_CONTINUE
- See Also:
-
ATTR_JID
- See Also:
-
ATTR_PASSWORD
- See Also:
-
ATTR_REASON
- See Also:
-
ATTR_THREAD
- See Also:
-
-
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 formroom@service, whereserviceis the name of group chat server, such aschat.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 formroom@service, whereserviceis the name of group chat server, such aschat.example.com.- Parameters:
roomAddress- the address of the group chat room.reason- the purpose for the invitationpassword- specifies a password needed for entrycontinueAsOneToOneChat- specifies if the groupchat room continues a one-to-one chat having the designated threadthread- the thread to continue
-
-
Method Details
-
getReason
Returns the purpose for the invitation.- Returns:
- the address of the group chat room.
-
getPassword
Returns the password needed for entry.- Returns:
- the password needed for entry
-
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 formroom@service, whereserviceis the name of group chat server, such aschat.example.com.- Returns:
- the address of the group chat room.
-
getElementName
- Specified by:
getElementNamein interfaceorg.jivesoftware.smack.packet.NamedElement
-
getNamespace
- Specified by:
getNamespacein interfaceorg.jivesoftware.smack.packet.XmlElement
-
toXML
public org.jivesoftware.smack.util.XmlStringBuilder toXML(org.jivesoftware.smack.packet.XmlEnvironment enclosingNamespace) - Specified by:
toXMLin interfaceorg.jivesoftware.smack.packet.Element
-
equals
-
hashCode
public int hashCode() -
from
Get the group chat invitation from the given stanza.- Parameters:
packet- TODO javadoc me please- Returns:
- the GroupChatInvitation or null
-