public final class MucUser
extends java.lang.Object
The implementation of the <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.
|
java.util.List<Invite> |
getInvites()
Gets the invites
|
Item |
getItem()
Gets the item.
|
java.lang.String |
getPassword()
Gets the password for the room.
|
java.util.Set<Status> |
getStatusCodes()
Gets the status codes.
|
static MucUser |
withDecline(Jid to,
java.lang.String reason)
Creates a
<x/> element with a <decline/> child element. |
static MucUser |
withDestroy(Affiliation affiliation,
Role role,
Jid jid,
java.lang.String reason)
Creates a
<x/> element with an <item/> and a <destroy/> child element. |
static MucUser |
withInvite(java.lang.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,
java.lang.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,
java.lang.String nick,
Actor actor,
java.lang.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,
java.lang.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,
java.lang.String nick,
java.lang.String reason)
Creates a
<x/> element with an <item/> and a <status/> child element. |
static MucUser |
withItem(Role role,
java.lang.String nick,
java.lang.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)
Creates a <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)
Creates a <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, java.lang.String nick, Status... status)
Creates a <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, java.lang.String nick, java.lang.String reason, Status... status)
Creates a <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, java.lang.String reason, Status... status)
Creates a <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, java.lang.String nick, java.lang.String reason)
Creates a <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, java.lang.String nick, Actor actor, java.lang.String reason, Status... status)
Creates a <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, java.lang.String reason)
Creates a <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)
Creates a <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(java.lang.String password, Invite... invite)
Creates a <x/> element with an <invite/> and a <password/> child element.
Sample:
```xmlpassword - The password.invite - The invites.MucUser instance.public static MucUser withDecline(Jid to, java.lang.String reason)
Creates a <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)
Creates a <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 java.util.Set<Status> getStatusCodes()
Gets the status codes.
public Item getItem()
Gets the item.
public java.util.List<Invite> getInvites()
Gets the invites
public Decline getDecline()
Gets the decline.
public Destroy getDestroy()
Gets the destroy element.
public java.lang.String getPassword()
Gets the password for the room.
Copyright © 2014–2019 XMPP.rocks. All rights reserved.