public final class MucUser extends Object
<x/> element in the http://jabber.org/protocol/muc#user namespace.
// To create an element with an item of 'owner' and 'moderator'
MucUser mucUser = MucUser.withItem(Affiliation.OWNER, Role.MODERATOR);
This class is immutable.| Modifier and Type | Method and Description |
|---|---|
Decline |
getDecline()
Gets the decline.
|
Destroy |
getDestroy()
Gets the destroy element.
|
List<Invite> |
getInvites()
Gets the invites
|
Item |
getItem()
Gets the item.
|
String |
getPassword()
Gets the password for the room.
|
List<Status> |
getStatusCodes()
Gets the status codes.
|
static MucUser |
withDecline(Jid to,
String reason)
Creates a
<x/> element with a <decline/> child element. |
static MucUser |
withDestroy(Affiliation affiliation,
Role role,
Jid jid,
String reason)
Creates a
<x/> element with an <item/> and a <destroy/> child element. |
static MucUser |
withInvite(String password,
Invite... invite)
Creates a
<x/> element with an <invite/> and a <password/> child element. |
static MucUser |
withInvites(Invite... invite)
Creates a
<x/> element with an <invite/> child element. |
static MucUser |
withItem(Affiliation affiliation,
Role role,
Actor actor,
String reason,
Status... status)
Creates a
<x/> element with an <item/> and a <status/> child element. |
static MucUser |
withItem(Affiliation affiliation,
Role role,
Jid jid,
Status... status)
Creates a
<x/> element with an <item/> and a <status/> child element. |
static MucUser |
withItem(Affiliation affiliation,
Role role,
Jid jid,
String nick,
Actor actor,
String reason,
Status... status)
Creates a
<x/> element with an <item/> and a <status/> child element. |
static MucUser |
withItem(Affiliation affiliation,
Role role,
Jid jid,
String nick,
Status... status)
Creates a
<x/> element with an <item/> and a <status/> child element. |
static MucUser |
withItem(Affiliation affiliation,
Role role,
Status... status)
Creates a
<x/> element with an <item/> and a <status/> child element. |
static MucUser |
withItem(Affiliation affiliation,
Role role,
String nick,
String reason)
Creates a
<x/> element with an <item/> and a <status/> child element. |
static MucUser |
withItem(Role role,
String nick,
String reason,
Status... status)
Creates a
<x/> element with an <item/> and a <status/> child element. |
static MucUser |
withStatus(Status... status)
Creates a
<x/> element with one or more <status/> child elements. |
public static MucUser withItem(Affiliation affiliation, Role role, Status... status)
<x/> element with an <item/> and a <status/> child element.
Sample:
<x xmlns='http://jabber.org/protocol/muc#user'>
<item affiliation='owner' role='moderator'/>
<status code='110'/>
</x>
affiliation - The affiliation.role - The role.status - The status.MucUser instance.public static MucUser withItem(Affiliation affiliation, Role role, Jid jid, Status... status)
<x/> element with an <item/> and a <status/> child element.
Sample:
<x xmlns='http://jabber.org/protocol/muc#user'>
<item affiliation='none'
jid='hag66@shakespeare.lit/pda'
role='participant'/>
</x>
affiliation - The affiliation.role - The role.jid - The JID.status - The status.MucUser instance.public static MucUser withItem(Affiliation affiliation, Role role, Jid jid, String nick, Status... status)
<x/> element with an <item/> and a <status/> child element.
Sample:
<x xmlns='http://jabber.org/protocol/muc#user'>
<item affiliation='member'
jid='hag66@shakespeare.lit/pda'
nick='oldhag'
role='participant'/>
<status code='303'/>
</x>
affiliation - The affiliation.role - The role.jid - The JID.nick - The nick.status - The status.MucUser instance.public static MucUser withItem(Role role, String nick, String reason, Status... status)
<x/> element with an <item/> and a <status/> child element.
Sample:
<x xmlns='http://jabber.org/protocol/muc#user'>
<item affiliation='member'
jid='hag66@shakespeare.lit/pda'
nick='oldhag'
role='participant'/>
<status code='303'/>
</x>
role - The role.nick - The nick.reason - The reason.status - The status.MucUser instance.public static MucUser withItem(Affiliation affiliation, Role role, Actor actor, String reason, Status... status)
<x/> element with an <item/> and a <status/> child element.
Sample:
<x xmlns='http://jabber.org/protocol/muc#user'>
<item affiliation='none' role='none'>
<actor nick='Fluellen'/>
<reason>Avaunt, you cullion!</reason>
</item>
<status code='307'/>
</x>
affiliation - The affiliation.role - The role.actor - The actor.reason - The reason.status - The status.MucUser instance.public static MucUser withItem(Affiliation affiliation, Role role, String nick, String reason)
<x/> element with an <item/> and a <status/> child element.
Sample:
<x xmlns='http://jabber.org/protocol/muc#user'>
<item affiliation='member'
nick='thirdwitch'
role='participant'>
<reason>A worthy witch indeed!</reason>
</item>
</x>
affiliation - The affiliation.role - The role.nick - The nick.reason - The reason.MucUser instance.public static MucUser withItem(Affiliation affiliation, Role role, Jid jid, String nick, Actor actor, String reason, Status... status)
<x/> element with an <item/> and a <status/> child element.
Sample:
<x xmlns='http://jabber.org/protocol/muc#user'>
<item affiliation='none' role='none' jid='hag66@shakespeare.lit/pda' nick='oldhag'>
<actor nick='Fluellen'/>
<reason>Avaunt, you cullion!</reason>
</item>
<status code='307'/>
</x>
affiliation - The affiliation.role - The role.jid - The JID.nick - The nick.actor - The actor.reason - The reason.status - The status.MucUser instance.public static MucUser withDestroy(Affiliation affiliation, Role role, Jid jid, String reason)
<x/> element with an <item/> and a <destroy/> child element.
Sample:
<x xmlns='http://jabber.org/protocol/muc#user'>
<item affiliation='none' role='none'/>
<destroy jid='coven@chat.shakespeare.lit'>
<reason>Macbeth doth come.</reason>
</destroy>
</x>
affiliation - The affiliation.role - The role.jid - The JID.reason - The reason.MucUser instance.public static MucUser withInvites(Invite... invite)
<x/> element with an <invite/> child element.
Sample:
<x xmlns='http://jabber.org/protocol/muc#user'>
<invite to='hecate@shakespeare.lit'/>
</x>
invite - The invites.MucUser instance.public static MucUser withInvite(String password, Invite... invite)
<x/> element with an <invite/> and a <password/> child element.
Sample:
<x xmlns='http://jabber.org/protocol/muc#user'>
<invite to='hecate@shakespeare.lit'/>
<password>cauldronburn</password>
</x>
password - The password.invite - The invites.MucUser instance.public static MucUser withDecline(Jid to, String reason)
<x/> element with a <decline/> child element.
Sample:
<x xmlns='http://jabber.org/protocol/muc#user'>
<decline to='crone1@shakespeare.lit'>
<reason>
Sorry, I'm too busy right now.
</reason>
</decline>
</x>
to - The to attribute.reason - The reason.MucUser instance.public static MucUser withStatus(Status... status)
<x/> element with one or more <status/> child elements.
Sample:
<x xmlns='http://jabber.org/protocol/muc#user'>
<status code='170'/>
</x>
status - The status.MucUser instance.public List<Status> getStatusCodes()
public Item getItem()
public Decline getDecline()
public Destroy getDestroy()
public String getPassword()
Copyright © 2014–2018 XMPP.rocks. All rights reserved.