📄 multiuserchatservice.html
字号:
<PRE>void <B>addUserAllowedToCreate</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> userJID)</PRE><DL><DD>Adds a new user to the list of JIDs that are allowed to create MUC rooms.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>userJID</CODE> - the bare JID of the new user to add to list.</DL></DD></DL><HR><A NAME="removeUserAllowedToCreate(java.lang.String)"><!-- --></A><H3>removeUserAllowedToCreate</H3><PRE>void <B>removeUserAllowedToCreate</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> userJID)</PRE><DL><DD>Removes a user from list of JIDs that are allowed to create MUC rooms.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>userJID</CODE> - the bare JID of the user to remove from the list.</DL></DD></DL><HR><A NAME="setKickIdleUsersTimeout(int)"><!-- --></A><H3>setKickIdleUsersTimeout</H3><PRE>void <B>setKickIdleUsersTimeout</B>(int timeout)</PRE><DL><DD>Sets the time to elapse between clearing of idle chat users. A <code>TimerTask</code> will be added to a <code>Timer</code> scheduled for repeated fixed-delay execution whose main responsibility is to kick users that have been idle for a certain time. A user is considered idle if he/she didn't send any message to any group chat room for a certain amount of time. See <A HREF="../../../../org/jivesoftware/openfire/muc/MultiUserChatService.html#setUserIdleTime(int)"><CODE>setUserIdleTime(int)</CODE></A>.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>timeout</CODE> - the time to elapse between clearing of idle chat users.</DL></DD></DL><HR><A NAME="getKickIdleUsersTimeout()"><!-- --></A><H3>getKickIdleUsersTimeout</H3><PRE>int <B>getKickIdleUsersTimeout</B>()</PRE><DL><DD>Returns the time to elapse between clearing of idle chat users. A user is considered idle if he/she didn't send any message to any group chat room for a certain amount of time. See <A HREF="../../../../org/jivesoftware/openfire/muc/MultiUserChatService.html#getUserIdleTime()"><CODE>getUserIdleTime()</CODE></A>.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the time to elapse between clearing of idle chat users.</DL></DD></DL><HR><A NAME="setUserIdleTime(int)"><!-- --></A><H3>setUserIdleTime</H3><PRE>void <B>setUserIdleTime</B>(int idle)</PRE><DL><DD>Sets the number of milliseconds a user must be idle before he/she gets kicked from all the rooms. By idle we mean that the user didn't send any message to any group chat room.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>idle</CODE> - the amount of time to wait before considering a user idle.</DL></DD></DL><HR><A NAME="getUserIdleTime()"><!-- --></A><H3>getUserIdleTime</H3><PRE>int <B>getUserIdleTime</B>()</PRE><DL><DD>Returns the number of milliseconds a user must be idle before he/she gets kicked from all the rooms. By idle we mean that the user didn't send any message to any group chat room.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the amount of time to wait before considering a user idle.</DL></DD></DL><HR><A NAME="setLogConversationsTimeout(int)"><!-- --></A><H3>setLogConversationsTimeout</H3><PRE>void <B>setLogConversationsTimeout</B>(int timeout)</PRE><DL><DD>Sets the time to elapse between logging the room conversations. A <code>TimerTask</code> will be added to a <code>Timer</code> scheduled for repeated fixed-delay execution whose main responsibility is to log queued rooms conversations. The number of queued conversations to save on each run can be configured. See <A HREF="../../../../org/jivesoftware/openfire/muc/MultiUserChatService.html#setLogConversationBatchSize(int)"><CODE>setLogConversationBatchSize(int)</CODE></A>.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>timeout</CODE> - the time to elapse between logging the room conversations.</DL></DD></DL><HR><A NAME="getLogConversationsTimeout()"><!-- --></A><H3>getLogConversationsTimeout</H3><PRE>int <B>getLogConversationsTimeout</B>()</PRE><DL><DD>Returns the time to elapse between logging the room conversations. A <code>TimerTask</code> will be added to a <code>Timer</code> scheduled for repeated fixed-delay execution whose main responsibility is to log queued rooms conversations. The number of queued conversations to save on each run can be configured. See <A HREF="../../../../org/jivesoftware/openfire/muc/MultiUserChatService.html#getLogConversationBatchSize()"><CODE>getLogConversationBatchSize()</CODE></A>.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the time to elapse between logging the room conversations.</DL></DD></DL><HR><A NAME="setLogConversationBatchSize(int)"><!-- --></A><H3>setLogConversationBatchSize</H3><PRE>void <B>setLogConversationBatchSize</B>(int size)</PRE><DL><DD>Sets the number of messages to save to the database on each run of the logging process. Even though the saving of queued conversations takes place in another thread it is not recommended specifying a big number.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>size</CODE> - the number of messages to save to the database on each run of the logging process.</DL></DD></DL><HR><A NAME="getLogConversationBatchSize()"><!-- --></A><H3>getLogConversationBatchSize</H3><PRE>int <B>getLogConversationBatchSize</B>()</PRE><DL><DD>Returns the number of messages to save to the database on each run of the logging process.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the number of messages to save to the database on each run of the logging process.</DL></DD></DL><HR><A NAME="getHistoryStrategy()"><!-- --></A><H3>getHistoryStrategy</H3><PRE><A HREF="../../../../org/jivesoftware/openfire/muc/HistoryStrategy.html" title="class in org.jivesoftware.openfire.muc">HistoryStrategy</A> <B>getHistoryStrategy</B>()</PRE><DL><DD>Obtain the server-wide default message history settings.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>The message history strategy defaults for the server.</DL></DD></DL><HR><A NAME="getChatRoom(java.lang.String, org.xmpp.packet.JID)"><!-- --></A><H3>getChatRoom</H3><PRE><A HREF="../../../../org/jivesoftware/openfire/muc/MUCRoom.html" title="interface in org.jivesoftware.openfire.muc">MUCRoom</A> <B>getChatRoom</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> roomName, <A HREF="../../../../org/xmpp/packet/JID.html" title="class in org.xmpp.packet">JID</A> userjid) throws <A HREF="../../../../org/jivesoftware/openfire/muc/NotAllowedException.html" title="class in org.jivesoftware.openfire.muc">NotAllowedException</A></PRE><DL><DD>Obtains a chatroom by name. A chatroom is created for that name if none exists and the user has permission. The user that asked for the chatroom will be the room's owner if the chatroom was created.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>roomName</CODE> - Name of the room to get.<DD><CODE>userjid</CODE> - The user's normal jid, not the chat nickname jid.<DT><B>Returns:</B><DD>The chatroom for the given name.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../org/jivesoftware/openfire/muc/NotAllowedException.html" title="class in org.jivesoftware.openfire.muc">NotAllowedException</A></CODE> - If the caller doesn't have permission to create a new room.</DL></DD></DL><HR><A NAME="getChatRoom(java.lang.String)"><!-- --></A><H3>getChatRoom</H3><PRE><A HREF="../../../../org/jivesoftware/openfire/muc/MUCRoom.html" title="interface in org.jivesoftware.openfire.muc">MUCRoom</A> <B>getChatRoom</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> roomName)</PRE><DL><DD>Obtains a chatroom by name. If the chatroom does not exists then null will be returned.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>roomName</CODE> - Name of the room to get.<DT><B>Returns:</B><DD>The chatroom for the given name or null if the room does not exists.</DL></DD></DL><HR><A NAME="getChatRooms()"><!-- --></A><H3>getChatRooms</H3><PRE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/List.html" title="class or interface in java.util">List</A><<A HREF="../../../../org/jivesoftware/openfire/muc/MUCRoom.html" title="interface in org.jivesoftware.openfire.muc">MUCRoom</A>> <B>getChatRooms</B>()</PRE><DL><DD>Retuns a list with a snapshot of all the rooms in the server (i.e. persistent or not, in memory or not).<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>a list with a snapshot of all the rooms.</DL></DD></DL><HR><A NAME="hasChatRoom(java.lang.String)"><!-- --></A><H3>hasChatRoom</H3><PRE>boolean <B>hasChatRoom</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> roomName)</PRE><DL><DD>Returns true if the server includes a chatroom with the requested name.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>roomName</CODE> - the name of the chatroom to check.<DT><B>Returns:</B><DD>true if the server includes a chatroom with the requested name.</DL></DD></DL><HR><A NAME="chatRoomRemoved(org.jivesoftware.openfire.muc.spi.LocalMUCRoom)"><!-- --></A><H3>chatRoomRemoved</H3><PRE>void <B>chatRoomRemoved</B>(<A HREF="../../../../org/jivesoftware/openfire/muc/spi/LocalMUCRoom.html" title="class in org.jivesoftware.openfire.muc.spi">LocalMUCRoom</A> room)</PRE><DL><DD>Notification message indicating that the specified chat room was removed from some other cluster member.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>room</CODE> - the removed room in another cluster node.</DL></DD></DL><HR><A NAME="chatRoomAdded(org.jivesoftware.openfire.muc.spi.LocalMUCRoom)"><!-- --></A><H3>chatRoomAdded</H3><PRE>void <B>chatRoomAdded</B>(<A HREF="../../../../org/jivesoftware/openfire/muc/spi/LocalMUCRoom.html" title="class in org.jivesoftware.openfire.muc.spi">LocalMUCRoom</A> room)</PRE><DL><DD>Notification message indicating that a chat room has been created in another cluster member.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>room</CODE> - the created room in another cluster node.</DL></DD></DL>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -