📄 localmucrole.html
字号:
<TD><CODE><B><A HREF="../../../../../org/jivesoftware/openfire/muc/spi/LocalMUCRole.html#getUserAddress()">getUserAddress</A></B>()</CODE><BR> Obtain the XMPPAddress of the user that joined the room.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/jivesoftware/openfire/muc/spi/LocalMUCRole.html#isLocal()">isLocal</A></B>()</CODE><BR> Returns true if this room occupant is hosted by this JVM.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/jivesoftware/openfire/muc/spi/LocalMUCRole.html#isVoiceOnly()">isVoiceOnly</A></B>()</CODE><BR> Returns true if the room occupant does not want to get messages broadcasted to all room occupants.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/jivesoftware/openfire/muc/spi/LocalMUCRole.html#send(org.xmpp.packet.Packet)">send</A></B>(<A HREF="../../../../../org/xmpp/packet/Packet.html" title="class in org.xmpp.packet">Packet</A> packet)</CODE><BR> Sends a packet to the user.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/jivesoftware/openfire/muc/spi/LocalMUCRole.html#setAffiliation(org.jivesoftware.openfire.muc.MUCRole.Affiliation)">setAffiliation</A></B>(<A HREF="../../../../../org/jivesoftware/openfire/muc/MUCRole.Affiliation.html" title="enum in org.jivesoftware.openfire.muc">MUCRole.Affiliation</A> newAffiliation)</CODE><BR> Call this method to promote or demote a user's affiliation in a chatroom.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/jivesoftware/openfire/muc/spi/LocalMUCRole.html#setPresence(org.xmpp.packet.Presence)">setPresence</A></B>(<A HREF="../../../../../org/xmpp/packet/Presence.html" title="class in org.xmpp.packet">Presence</A> newPresence)</CODE><BR> Set the current presence status of a user in a chatroom.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/jivesoftware/openfire/muc/spi/LocalMUCRole.html#setRole(org.jivesoftware.openfire.muc.MUCRole.Role)">setRole</A></B>(<A HREF="../../../../../org/jivesoftware/openfire/muc/MUCRole.Role.html" title="enum in org.jivesoftware.openfire.muc">MUCRole.Role</A> newRole)</CODE><BR> Call this method to promote or demote a user's role in a chatroom.</TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD></TR></TABLE> <P><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TH></TR></TABLE><A NAME="LocalMUCRole(org.jivesoftware.openfire.muc.MultiUserChatService, org.jivesoftware.openfire.muc.spi.LocalMUCRoom, java.lang.String, org.jivesoftware.openfire.muc.MUCRole.Role, org.jivesoftware.openfire.muc.MUCRole.Affiliation, org.jivesoftware.openfire.muc.spi.LocalMUCUser, org.xmpp.packet.Presence, org.jivesoftware.openfire.PacketRouter)"><!-- --></A><H3>LocalMUCRole</H3><PRE>public <B>LocalMUCRole</B>(<A HREF="../../../../../org/jivesoftware/openfire/muc/MultiUserChatService.html" title="interface in org.jivesoftware.openfire.muc">MultiUserChatService</A> chatserver, <A HREF="../../../../../org/jivesoftware/openfire/muc/spi/LocalMUCRoom.html" title="class in org.jivesoftware.openfire.muc.spi">LocalMUCRoom</A> chatroom, <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> nickname, <A HREF="../../../../../org/jivesoftware/openfire/muc/MUCRole.Role.html" title="enum in org.jivesoftware.openfire.muc">MUCRole.Role</A> role, <A HREF="../../../../../org/jivesoftware/openfire/muc/MUCRole.Affiliation.html" title="enum in org.jivesoftware.openfire.muc">MUCRole.Affiliation</A> affiliation, <A HREF="../../../../../org/jivesoftware/openfire/muc/spi/LocalMUCUser.html" title="class in org.jivesoftware.openfire.muc.spi">LocalMUCUser</A> chatuser, <A HREF="../../../../../org/xmpp/packet/Presence.html" title="class in org.xmpp.packet">Presence</A> presence, <A HREF="../../../../../org/jivesoftware/openfire/PacketRouter.html" title="interface in org.jivesoftware.openfire">PacketRouter</A> packetRouter)</PRE><DL><DD>Create a new role.<P><DL><DT><B>Parameters:</B><DD><CODE>chatserver</CODE> - the server hosting the role.<DD><CODE>chatroom</CODE> - the room the role is valid in.<DD><CODE>nickname</CODE> - the nickname of the user in the role.<DD><CODE>role</CODE> - the role of the user in the room.<DD><CODE>affiliation</CODE> - the affiliation of the user in the room.<DD><CODE>chatuser</CODE> - the user on the chat server.<DD><CODE>presence</CODE> - the presence sent by the user to join the room.<DD><CODE>packetRouter</CODE> - the packet router for sending messages from this role.</DL></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="getPresence()"><!-- --></A><H3>getPresence</H3><PRE>public <A HREF="../../../../../org/xmpp/packet/Presence.html" title="class in org.xmpp.packet">Presence</A> <B>getPresence</B>()</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../../org/jivesoftware/openfire/muc/MUCRole.html#getPresence()">MUCRole</A></CODE></B></DD><DD>Obtain the current presence status of a user in a chatroom.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/jivesoftware/openfire/muc/MUCRole.html#getPresence()">getPresence</A></CODE> in interface <CODE><A HREF="../../../../../org/jivesoftware/openfire/muc/MUCRole.html" title="interface in org.jivesoftware.openfire.muc">MUCRole</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>The presence of the user in the room.</DL></DD></DL><HR><A NAME="setPresence(org.xmpp.packet.Presence)"><!-- --></A><H3>setPresence</H3><PRE>public void <B>setPresence</B>(<A HREF="../../../../../org/xmpp/packet/Presence.html" title="class in org.xmpp.packet">Presence</A> newPresence)</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../../org/jivesoftware/openfire/muc/MUCRole.html#setPresence(org.xmpp.packet.Presence)">MUCRole</A></CODE></B></DD><DD>Set the current presence status of a user in a chatroom.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/jivesoftware/openfire/muc/MUCRole.html#setPresence(org.xmpp.packet.Presence)">setPresence</A></CODE> in interface <CODE><A HREF="../../../../../org/jivesoftware/openfire/muc/MUCRole.html" title="interface in org.jivesoftware.openfire.muc">MUCRole</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>newPresence</CODE> - The presence of the user in the room.</DL></DD></DL><HR><A NAME="setRole(org.jivesoftware.openfire.muc.MUCRole.Role)"><!-- --></A><H3>setRole</H3><PRE>public void <B>setRole</B>(<A HREF="../../../../../org/jivesoftware/openfire/muc/MUCRole.Role.html" title="enum in org.jivesoftware.openfire.muc">MUCRole.Role</A> newRole) throws <A HREF="../../../../../org/jivesoftware/openfire/muc/NotAllowedException.html" title="class in org.jivesoftware.openfire.muc">NotAllowedException</A></PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../../org/jivesoftware/openfire/muc/MUCRole.html#setRole(org.jivesoftware.openfire.muc.MUCRole.Role)">MUCRole</A></CODE></B></DD><DD>Call this method to promote or demote a user's role in a chatroom. It is common for the chatroom or other chat room members to change the role of users (a moderator promoting another user to moderator status for example).<p> <p/> Owning ChatUsers should have their membership roles updated.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/jivesoftware/openfire/muc/MUCRole.html#setRole(org.jivesoftware.openfire.muc.MUCRole.Role)">setRole</A></CODE> in interface <CODE><A HREF="../../../../../org/jivesoftware/openfire/muc/MUCRole.html" title="interface in org.jivesoftware.openfire.muc">MUCRole</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>newRole</CODE> - The new role that the user will play.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../../org/jivesoftware/openfire/muc/NotAllowedException.html" title="class in org.jivesoftware.openfire.muc">NotAllowedException</A></CODE> - Thrown if trying to change the moderator role to an owner or administrator.</DL></DD></DL><HR><A NAME="getRole()"><!-- --></A><H3>getRole</H3><PRE>public <A HREF="../../../../../org/jivesoftware/openfire/muc/MUCRole.Role.html" title="enum in org.jivesoftware.openfire.muc">MUCRole.Role</A> <B>getRole</B>()</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../../org/jivesoftware/openfire/muc/MUCRole.html#getRole()">MUCRole</A></CODE></B></DD><DD>Obtain the role state of the user.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/jivesoftware/openfire/muc/MUCRole.html#getRole()">getRole</A></CODE> in interface <CODE><A HREF="../../../../../org/jivesoftware/openfire/muc/MUCRole.html" title="interface in org.jivesoftware.openfire.muc">MUCRole</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>The role status of this user.</DL></DD></DL><HR><A NAME="setAffiliation(org.jivesoftware.openfire.muc.MUCRole.Affiliation)"><!-- --></A><H3>setAffiliation</H3><PRE>public void <B>setAffiliation</B>(<A HREF="../../../../../org/jivesoftware/openfire/muc/MUCRole.Affiliation.html" title="enum in org.jivesoftware.openfire.muc">MUCRole.Affiliation</A> newAffiliation) throws <A HREF="../../../../../org/jivesoftware/openfire/muc/NotAllowedException.html" title="class in org.jivesoftware.openfire.muc">NotAllowedException</A></PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../../org/jivesoftware/openfire/muc/MUCRole.html#setAffiliation(org.jivesoftware.openfire.muc.MUCRole.Affiliation)">MUCRole</A></CODE></B></DD><DD>Call this method to promote or demote a user's affiliation in a chatroom.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/jivesoftware/openfire/muc/MUCRole.html#setAffiliation(org.jivesoftware.openfire.muc.MUCRole.Affiliation)">setAffiliation</A></CODE> in interface <CODE><A HREF="../../../../../org/jivesoftware/openfire/muc/MUCRole.html" title="interface in org.jivesoftware.openfire.muc">MUCRole</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>newAffiliation</CODE> - the new affiliation that the user will play.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../../org/jivesoftware/openfire/muc/NotAllowedException.html" title="class in org.jivesoftware.openfire.muc">NotAllowedException</A></CODE> - thrown if trying to ban an owner or an administrator.</DL></DD></DL><HR><A NAME="getAffiliation()"><!-- --></A><H3>getAffiliation</H3><PRE>public <A HREF="../../../../../org/jivesoftware/openfire/muc/MUCRole.Affiliation.html" title="enum in org.jivesoftware.openfire.muc">MUCRole.Affiliation</A> <B>getAffiliation</B>()</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../../org/jivesoftware/openfire/muc/MUCRole.html#getAffiliation()">MUCRole</A></CODE></B></DD><DD>Obtain the affiliation state of the user.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/jivesoftware/openfire/muc/MUCRole.html#getAffiliation()">getAffiliation</A></CODE> in interface <CODE><A HREF="../../../../../org/jivesoftware/openfire/muc/MUCRole.html" title="interface in org.jivesoftware.openfire.muc">MUCRole</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>The affiliation status of this user.</DL></DD></DL><HR><A NAME="getNickname()"><!-- --></A><H3>getNickname</H3><PRE>public <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> <B>getNickname</B>()</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../../org/jivesoftware/openfire/muc/MUCRole.html#getNickname()">MUCRole</A></CODE></B></DD><DD>Obtain the nickname for the user in the chatroom.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/jivesoftware/openfire/muc/MUCRole.html#getNickname()">getNickname</A></CODE> in interface <CODE><A HREF="../../../../../org/jivesoftware/openfire/muc/MUCRole.html" title="interface in org.jivesoftware.openfire.muc">MUCRole</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>The user's nickname in the room or null if invisible.</DL></DD></DL><HR>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -