|
Openfire 3.8.1 Javadoc | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jivesoftware.openfire.muc.spi.RemoteMUCRole
public class RemoteMUCRole
Representation of a room occupant of a local room that is being hosted by another cluster node. An instance of this class will exist for each room occupant that is hosted by another cluster node. Local rooms keep track of local and remote occupants in a transparent way.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.jivesoftware.openfire.muc.MUCRole |
|---|
MUCRole.Affiliation, MUCRole.Role |
| Constructor Summary | |
|---|---|
RemoteMUCRole()
Do not use this constructor. |
|
RemoteMUCRole(MultiUserChatService server,
OccupantAddedEvent event)
|
|
| Method Summary | |
|---|---|
void |
changeNickname(String nickname)
Changes the nickname of the occupant within the room to the new nickname. |
void |
destroy()
Destroys this role after the occupant left the room. |
MUCRole.Affiliation |
getAffiliation()
Obtain the affiliation state of the user. |
MUCRoom |
getChatRoom()
Obtain the chat room that hosts this user's role. |
String |
getNickname()
Obtain the nickname for the user in the chatroom. |
NodeID |
getNodeID()
Returns the id of the node that is hosting the room occupant. |
org.xmpp.packet.Presence |
getPresence()
Obtain the current presence status of a user in a chatroom. |
MUCRole.Role |
getRole()
Obtain the role state of the user. |
org.xmpp.packet.JID |
getRoleAddress()
Obtain the XMPPAddress representing this role in a room: room@server/nickname |
org.xmpp.packet.JID |
getUserAddress()
Obtain the XMPPAddress of the user that joined the room. |
boolean |
isLocal()
Returns true if this room occupant is hosted by this JVM. |
boolean |
isVoiceOnly()
Returns true if the room occupant does not want to get messages broadcasted to all room occupants. |
void |
readExternal(ObjectInput in)
|
void |
send(org.xmpp.packet.Packet packet)
Sends a packet to the user. |
void |
setAffiliation(MUCRole.Affiliation newAffiliation)
Call this method to promote or demote a user's affiliation in a chatroom. |
void |
setPresence(org.xmpp.packet.Presence presence)
Set the current presence status of a user in a chatroom. |
void |
setRole(MUCRole.Role newRole)
Call this method to promote or demote a user's role in a chatroom. |
void |
writeExternal(ObjectOutput out)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RemoteMUCRole()
public RemoteMUCRole(MultiUserChatService server,
OccupantAddedEvent event)
| Method Detail |
|---|
public org.xmpp.packet.Presence getPresence()
MUCRole
getPresence in interface MUCRolepublic void setPresence(org.xmpp.packet.Presence presence)
MUCRole
setPresence in interface MUCRolepresence - The presence of the user in the room.public void setRole(MUCRole.Role newRole)
MUCRoleOwning ChatUsers should have their membership roles updated.
setRole in interface MUCRolenewRole - The new role that the user will play.public MUCRole.Role getRole()
MUCRole
getRole in interface MUCRolepublic void setAffiliation(MUCRole.Affiliation newAffiliation)
MUCRole
setAffiliation in interface MUCRolenewAffiliation - the new affiliation that the user will play.public MUCRole.Affiliation getAffiliation()
MUCRole
getAffiliation in interface MUCRolepublic void changeNickname(String nickname)
MUCRole
changeNickname in interface MUCRolenickname - the new nickname of the occupant in the room.public String getNickname()
MUCRole
getNickname in interface MUCRolepublic void destroy()
MUCRole
destroy in interface MUCRolepublic boolean isVoiceOnly()
MUCRoleTo be a deaf occupant the initial presence sent to the room while joining the room has to include the following child element:
<x xmlns='http://jivesoftware.org/protocol/muc'>
<deaf-occupant/>
</x>
Note that this is a custom extension to the MUC specification.
isVoiceOnly in interface MUCRolepublic MUCRoom getChatRoom()
MUCRole
getChatRoom in interface MUCRolepublic org.xmpp.packet.JID getRoleAddress()
MUCRole
getRoleAddress in interface MUCRolepublic org.xmpp.packet.JID getUserAddress()
MUCRole
getUserAddress in interface MUCRolepublic boolean isLocal()
MUCRole
isLocal in interface MUCRolepublic NodeID getNodeID()
MUCRole
getNodeID in interface MUCRolepublic void send(org.xmpp.packet.Packet packet)
MUCRole
send in interface MUCRolepacket - The packet to send
public void writeExternal(ObjectOutput out)
throws IOException
writeExternal in interface ExternalizableIOException
public void readExternal(ObjectInput in)
throws IOException,
ClassNotFoundException
readExternal in interface ExternalizableIOException
ClassNotFoundException
|
Openfire 3.8.1 Javadoc | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||