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 java.lang.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 Modifier and Type Field Description static java.lang.String
ATTR_CONTINUE
static java.lang.String
ATTR_JID
static java.lang.String
ATTR_PASSWORD
static java.lang.String
ATTR_REASON
static java.lang.String
ATTR_THREAD
static java.lang.String
ELEMENT
Element name of the stanza extension.static java.lang.String
NAMESPACE
Namespace of the stanza extension.static javax.xml.namespace.QName
QNAME
-
Constructor Summary
Constructors Constructor Description GroupChatInvitation(org.jxmpp.jid.EntityBareJid roomAddress)
Creates a new group chat invitation to the specified room address.GroupChatInvitation(org.jxmpp.jid.EntityBareJid roomAddress, java.lang.String reason, java.lang.String password, boolean continueAsOneToOneChat, java.lang.String thread)
Creates a new group chat invitation to the specified room address.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
continueAsOneToOneChat()
Returns whether the groupchat room continues a one-to-one chat.boolean
equals(java.lang.Object obj)
static GroupChatInvitation
from(org.jivesoftware.smack.packet.Stanza packet)
Get the group chat invitation from the given stanza.java.lang.String
getElementName()
java.lang.String
getNamespace()
java.lang.String
getPassword()
Returns the password needed for entry.java.lang.String
getReason()
Returns the purpose for the invitation.org.jxmpp.jid.EntityBareJid
getRoomAddress()
Returns the address of the group chat room.java.lang.String
getThread()
Returns the thread to continue.int
hashCode()
org.jivesoftware.smack.util.XmlStringBuilder
toXML(org.jivesoftware.smack.packet.XmlEnvironment enclosingNamespace)
-
-
-
Field Detail
-
ELEMENT
public static final java.lang.String ELEMENT
Element name of the stanza extension.- See Also:
- Constant Field Values
-
NAMESPACE
public static final java.lang.String NAMESPACE
Namespace of the stanza extension.- See Also:
- Constant Field Values
-
QNAME
public static final javax.xml.namespace.QName QNAME
-
ATTR_CONTINUE
public static final java.lang.String ATTR_CONTINUE
- See Also:
- Constant Field Values
-
ATTR_JID
public static final java.lang.String ATTR_JID
- See Also:
- Constant Field Values
-
ATTR_PASSWORD
public static final java.lang.String ATTR_PASSWORD
- See Also:
- Constant Field Values
-
ATTR_REASON
public static final java.lang.String ATTR_REASON
- See Also:
- Constant Field Values
-
ATTR_THREAD
public static final java.lang.String ATTR_THREAD
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
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
, whereservice
is 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, java.lang.String reason, java.lang.String password, boolean continueAsOneToOneChat, java.lang.String thread)
Creates a new group chat invitation to the specified room address. GroupChat room addresses are in the formroom@service
, whereservice
is 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 Detail
-
getReason
public java.lang.String getReason()
Returns the purpose for the invitation.- Returns:
- the address of the group chat room.
-
getPassword
public java.lang.String getPassword()
Returns the password needed for entry.- Returns:
- the password needed for entry
-
getThread
public java.lang.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 formroom@service
, whereservice
is the name of group chat server, such aschat.example.com
.- Returns:
- the address of the group chat room.
-
getElementName
public java.lang.String getElementName()
- Specified by:
getElementName
in interfaceorg.jivesoftware.smack.packet.NamedElement
-
getNamespace
public java.lang.String getNamespace()
- Specified by:
getNamespace
in interfaceorg.jivesoftware.smack.packet.XmlElement
-
toXML
public org.jivesoftware.smack.util.XmlStringBuilder toXML(org.jivesoftware.smack.packet.XmlEnvironment enclosingNamespace)
- Specified by:
toXML
in interfaceorg.jivesoftware.smack.packet.Element
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.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
-
-