Smack

org.jivesoftware.smackx.muc
Class Occupant

java.lang.Object
  extended by org.jivesoftware.smackx.muc.Occupant

public class Occupant
extends Object

Represents the information about an occupant in a given room. The information will always have the affiliation and role of the occupant in the room. The full JID and nickname are optional.

Author:
Gaston Dombiak

Method Summary
 boolean equals(Object obj)
           
 String getAffiliation()
          Returns the affiliation of the occupant.
 String getJid()
          Returns the full JID of the occupant.
 String getNick()
          Returns the current nickname of the occupant in the room.
 String getRole()
          Returns the current role of the occupant in the room.
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getJid

public String getJid()
Returns the full JID of the occupant. If this information was extracted from a presence and the room is semi or full-anonymous then the answer will be null. On the other hand, if this information was obtained while maintaining the voice list or the moderator list then we will always have a full JID.

Returns:
the full JID of the occupant.

getAffiliation

public String getAffiliation()
Returns the affiliation of the occupant. Possible affiliations are: "owner", "admin", "member", "outcast". This information will always be available.

Returns:
the affiliation of the occupant.

getRole

public String getRole()
Returns the current role of the occupant in the room. This information will always be available.

Returns:
the current role of the occupant in the room.

getNick

public String getNick()
Returns the current nickname of the occupant in the room. If this information was extracted from a presence then the answer will be null.

Returns:
the current nickname of the occupant in the room or null if this information was obtained from a presence.

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

Smack

Copyright © 2003-2007 Jive Software.