|
Openfire 3.3.2 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jivesoftware.openfire.muc.spi.MUCUserImpl
public class MUCUserImpl
Implementation of MUCUser. There will be a MUCUser per user that is connected to one or more rooms. A MUCUser contains a collection of MUCRoles for each room where the user has joined.
Method Summary | |
---|---|
void |
addRole(String roomName,
MUCRole role)
Adds the role of the user in a particular room. |
JID |
getAddress()
Obtain the address of the user. |
long |
getID()
Obtain a user ID (useful for database indexing). |
long |
getLastPacketTime()
Get time (in milliseconds from System currentTimeMillis()) since last packet. |
MUCRole |
getRole(String roomName)
Obtain the role of the user in a particular room. |
Iterator<MUCRole> |
getRoles()
Get all roles for this user. |
boolean |
isJoined()
Returns true if the user is currently present in one or more rooms. |
void |
process(IQ packet)
|
void |
process(Message packet)
This method does all packet routing in the chat server. |
void |
process(Packet packet)
Process an XMPP packet. |
void |
process(Presence packet)
|
void |
removeRole(String roomName)
Removes the role of the user in a particular room. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public long getID()
MUCUser
getID
in interface MUCUser
public MUCRole getRole(String roomName) throws NotFoundException
MUCUser
getRole
in interface MUCUser
roomName
- The name of the room we're interested in
NotFoundException
- if the user does not have a role in the given roompublic boolean isJoined()
MUCUser
isJoined
in interface MUCUser
public Iterator<MUCRole> getRoles()
MUCUser
getRoles
in interface MUCUser
public void addRole(String roomName, MUCRole role)
MUCUser
addRole
in interface MUCUser
roomName
- The name of the room.role
- The new role of the user.public void removeRole(String roomName)
MUCUser
Note: PREREQUISITE: A lock on this object has already been obtained.
removeRole
in interface MUCUser
roomName
- The name of the room we're being removedpublic long getLastPacketTime()
MUCUser
getLastPacketTime
in interface MUCUser
public JID getAddress()
MUCUser
getAddress
in interface MUCUser
public void process(Packet packet) throws UnauthorizedException, PacketException
ChannelHandler
process
in interface ChannelHandler
packet
- a packet to process.
UnauthorizedException
- if not allowed to process the packet.
PacketException
- thrown if the packet is malformed (results in the sender's
session being shutdown).public void process(Message packet)
packet
- The packet to route.public void process(IQ packet)
public void process(Presence packet)
|
Openfire 3.3.2 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |