|
Jive Forums API (5.5.8) Developer Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jivesoftware.webchat.chat.group.GroupChatSession
public class GroupChatSession
GroupChatSession is used to track all information pertainting to a specified Group Chat Room, including participants presences, messages, and connnections.
| Field Summary | |
|---|---|
static int |
ADMIN_PAGE
|
static int |
BANNED_PAGE
|
static int |
IM_PAGE
|
static int |
MODERATOR_PAGE
|
| Constructor Summary | |
|---|---|
GroupChatSession(org.jivesoftware.smack.XMPPConnection con,
java.lang.String sessionID)
Create a new Group Chat Session from the specified Connection. |
|
| Method Summary | |
|---|---|
void |
addBlockedUser(java.lang.String nickname)
Adds a user to the blocked user list. |
void |
addPrivateMessage(org.jivesoftware.smack.packet.Message message)
Adds a private message to be polled. |
void |
close()
Explicitly close the Group Chat. |
java.util.Collection |
getBannedMembers()
Returns all banned members in this room. |
org.jivesoftware.smackx.muc.MultiUserChat |
getGroupChat()
Returns the MultiUserChat associated with this session. |
long |
getLastCheck()
|
ChatMessage[] |
getMessageList()
Returns a list of all new Messages waiting to be retrieved. |
java.util.Collection |
getModerators()
Returns all moderators in this room. |
java.lang.String[] |
getModifiedUsers()
Returns all users that have been modified in this room. |
java.util.Collection |
getNewUsers()
Returns a collection of all users who have joined the session since last being polled. |
java.lang.String |
getNickname()
|
int |
getPage()
Returns the active page id. |
ChatPresence[] |
getPresenceList()
Returns a list of all new presences waiting to be retrieved. |
ChatMessage[] |
getPrivateMessages()
Returns a collection of private messages. |
java.lang.String |
getRoomName()
Returns the name of the room this GroupChatSession is for. |
java.lang.String |
getSessionID()
|
java.lang.String |
getSubject()
|
org.jivesoftware.smackx.packet.MUCUser |
getUser(java.lang.String nickname)
Returns a MUCUser by their nickname. |
java.util.Collection |
getUsersWhoLeft()
Returns a collection of all users who have left the session since last being polled. |
boolean |
hasSubjectChanged()
Returns true if the subject has been changed. |
boolean |
hasVoice()
Checks whether this user has voice privileges. |
boolean |
hasVoice(java.lang.String nickname)
Check to see if the user has voice. |
boolean |
isActiveSession()
Returns true if this session is still active. |
boolean |
isAdministrator()
Checks to see if this user is a room admin. |
boolean |
isAdministrator(java.lang.String nickname)
Checks to see if the user is a room admin. |
boolean |
isAuthenticated()
Returns true if the user has logged in anonymous or with a username and password. |
boolean |
isBlocked(java.lang.String nickname)
Checks to see if a user is blocked. |
boolean |
isClosed()
Returns true if the connection is closed. |
boolean |
isInGroupChat()
Returns true if the Group Chat is active. |
boolean |
isModerator()
Returns true if this user is a moderator. |
boolean |
isModerator(java.lang.String nickname)
Check to see if the nickname is a moderator. |
void |
joinRoom(java.lang.String roomname,
java.lang.String nickname)
Join a MultiUserChat Room. |
void |
listenForMessages(org.jivesoftware.smack.XMPPConnection con,
org.jivesoftware.smackx.muc.MultiUserChat chat)
Listen for new messages. |
void |
login(java.lang.String username,
java.lang.String password)
Login the user using the specified username and password. |
void |
loginAnonymously()
Login the user as anonoymus |
boolean |
moderatorPermissionChanged()
Need to handle simple state changes without always checking. |
boolean |
pageStateHasChanged()
Check to see if the page state has been changed since last checking. |
void |
processPacket(org.jivesoftware.smack.packet.Packet packet)
|
void |
removeBlockedUser(java.lang.String nickname)
Removes a user from the blocked user list. |
void |
removeMessages(int size)
Removes certain size from message list. |
void |
removePresences(int size)
Removes certain size from presence list. |
void |
sentMessage()
|
void |
setPage(int pageID)
Sets the current active page id. |
boolean |
voicePermissionChanged()
Voice privilieges have been changed. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int IM_PAGE
public static final int MODERATOR_PAGE
public static final int BANNED_PAGE
public static final int ADMIN_PAGE
| Constructor Detail |
|---|
public GroupChatSession(org.jivesoftware.smack.XMPPConnection con,
java.lang.String sessionID)
con - the XMPPConnection of this session.| Method Detail |
|---|
public boolean isAuthenticated()
public void loginAnonymously()
throws org.jivesoftware.smack.XMPPException
org.jivesoftware.smack.XMPPException
public void login(java.lang.String username,
java.lang.String password)
throws org.jivesoftware.smack.XMPPException
username - the usernamepassword - the password
org.jivesoftware.smack.XMPPExceptionpublic boolean isInGroupChat()
public org.jivesoftware.smackx.muc.MultiUserChat getGroupChat()
MultiUserChat associated with this session.
MultiUserChat associated with this session.public boolean isClosed()
public void close()
public void joinRoom(java.lang.String roomname,
java.lang.String nickname)
roomname - the name of the room to join(ex.my_room@conference.localhost).nickname - the nickname to join the room as.
public void listenForMessages(org.jivesoftware.smack.XMPPConnection con,
org.jivesoftware.smackx.muc.MultiUserChat chat)
con - chat - public ChatMessage[] getMessageList()
public boolean isActiveSession()
public ChatPresence[] getPresenceList()
public void removeMessages(int size)
size - the size to remove.public void removePresences(int size)
size - the size to remove.public void sentMessage()
public void processPacket(org.jivesoftware.smack.packet.Packet packet)
processPacket in interface org.jivesoftware.smack.PacketListenerpublic java.util.Collection getUsersWhoLeft()
public java.util.Collection getNewUsers()
public void addBlockedUser(java.lang.String nickname)
nickname - the nickname of the user who is being blocked.public void removeBlockedUser(java.lang.String nickname)
nickname - the nickname of the user who is being unblocked.public boolean isBlocked(java.lang.String nickname)
nickname - the nickname of the use to check.
public void addPrivateMessage(org.jivesoftware.smack.packet.Message message)
message - the message to add.public ChatMessage[] getPrivateMessages()
public org.jivesoftware.smackx.packet.MUCUser getUser(java.lang.String nickname)
MUCUser by their nickname.
nickname - the nickname of the MUCUser to return.
MUCUserpublic boolean isModerator()
public boolean isAdministrator()
public boolean isAdministrator(java.lang.String nickname)
nickname - the nickname of the user to check.
public boolean hasVoice()
public boolean moderatorPermissionChanged()
public boolean voicePermissionChanged()
public java.util.Collection getModerators()
public java.lang.String[] getModifiedUsers()
public void setPage(int pageID)
pageID - the active page id.public int getPage()
public boolean pageStateHasChanged()
public boolean isModerator(java.lang.String nickname)
nickname - the nickname of the user to check.
public boolean hasVoice(java.lang.String nickname)
nickname - the nickname of the user.
public boolean hasSubjectChanged()
public java.util.Collection getBannedMembers()
public long getLastCheck()
public java.lang.String getSessionID()
public java.lang.String getRoomName()
public java.lang.String getSubject()
public java.lang.String getNickname()
|
Jive Forums Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||