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 Summary
Fields Modifier and Type Field Description static StringATTR_CONTINUEstatic StringATTR_JIDstatic StringATTR_PASSWORDstatic StringATTR_REASONstatic StringATTR_THREADstatic StringELEMENTElement name of the stanza extension.static StringNAMESPACENamespace of the stanza extension.static QNameQNAME
-
Constructor Summary
Constructors Constructor Description GroupChatInvitation(EntityBareJid roomAddress)Creates a new group chat invitation to the specified room address.GroupChatInvitation(EntityBareJid roomAddress, String reason, String password, boolean continueAsOneToOneChat, 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 booleancontinueAsOneToOneChat()Returns whether the groupchat room continues a one-to-one chat.booleanequals(Object obj)static GroupChatInvitationfrom(Stanza packet)Get the group chat invitation from the given stanza.StringgetElementName()Returns the root element name.StringgetNamespace()Returns the root element XML namespace.StringgetPassword()Returns the password needed for entry.StringgetReason()Returns the purpose for the invitation.EntityBareJidgetRoomAddress()Returns the address of the group chat room.StringgetThread()Returns the thread to continue.inthashCode()XmlStringBuildertoXML(XmlEnvironment enclosingNamespace)-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jivesoftware.smack.packet.XmlElement
getLanguage, getQName
-
-
-
-
Field Detail
-
ELEMENT
public static final String ELEMENT
Element name of the stanza extension.- See Also:
- Constant Field Values
-
NAMESPACE
public static final String NAMESPACE
Namespace of the stanza extension.- See Also:
- Constant Field Values
-
ATTR_CONTINUE
public static final String ATTR_CONTINUE
- See Also:
- Constant Field Values
-
ATTR_JID
public static final String ATTR_JID
- See Also:
- Constant Field Values
-
ATTR_PASSWORD
public static final String ATTR_PASSWORD
- See Also:
- Constant Field Values
-
ATTR_REASON
public static final String ATTR_REASON
- See Also:
- Constant Field Values
-
ATTR_THREAD
public static final String ATTR_THREAD
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
GroupChatInvitation
public GroupChatInvitation(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(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 Detail
-
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 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
public String getElementName()
Description copied from interface:NamedElementReturns the root element name.- Specified by:
getElementNamein interfaceNamedElement- Returns:
- the element name.
-
getNamespace
public String getNamespace()
Description copied from interface:XmlElementReturns the root element XML namespace.- Specified by:
getNamespacein interfaceXmlElement- Returns:
- the namespace.
-
toXML
public XmlStringBuilder toXML(XmlEnvironment enclosingNamespace)
-
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
-
-