⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 presence.html

📁 开源项目smack的API文件
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<TD><CODE><B><A HREF="../../../../org/jivesoftware/smack/packet/Presence.html#getMode()">getMode</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the mode of the presence update, or <tt>null</tt> if the mode is not set.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/smack/packet/Presence.html#getPriority()">getPriority</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the priority of the presence, or Integer.MIN_VALUE if no priority has been set.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/smack/packet/Presence.html#getStatus()">getStatus</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the status message of the presence update, or <tt>null</tt> if there is not a status.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../../org/jivesoftware/smack/packet/Presence.Type.html" title="enum in org.jivesoftware.smack.packet">Presence.Type</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/smack/packet/Presence.html#getType()">getType</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the type of this presence packet.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/smack/packet/Presence.html#isAvailable()">isAvailable</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true if the <A HREF="../../../../org/jivesoftware/smack/packet/Presence.Type.html" title="enum in org.jivesoftware.smack.packet"><CODE>presence type</CODE></A> is available (online) and false if the user is unavailable (offline), or if this is a presence packet involved in a subscription operation.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/smack/packet/Presence.html#isAway()">isAway</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true if the presence type is <A HREF="../../../../org/jivesoftware/smack/packet/Presence.Type.html#available"><CODE>available</CODE></A> and the presence mode is <A HREF="../../../../org/jivesoftware/smack/packet/Presence.Mode.html#away"><CODE>away</CODE></A>, <A HREF="../../../../org/jivesoftware/smack/packet/Presence.Mode.html#xa"><CODE>extended away</CODE></A>, or <A HREF="../../../../org/jivesoftware/smack/packet/Presence.Mode.html#dnd"><CODE>do not disturb</CODE></A>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/smack/packet/Presence.html#setLanguage(java.lang.String)">setLanguage</A></B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;language)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the xml:lang of this Presence.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/smack/packet/Presence.html#setMode(org.jivesoftware.smack.packet.Presence.Mode)">setMode</A></B>(<A HREF="../../../../org/jivesoftware/smack/packet/Presence.Mode.html" title="enum in org.jivesoftware.smack.packet">Presence.Mode</A>&nbsp;mode)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the mode of the presence update.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/smack/packet/Presence.html#setPriority(int)">setPriority</A></B>(int&nbsp;priority)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the priority of the presence.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/smack/packet/Presence.html#setStatus(java.lang.String)">setStatus</A></B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;status)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the status message of the presence update.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/smack/packet/Presence.html#setType(org.jivesoftware.smack.packet.Presence.Type)">setType</A></B>(<A HREF="../../../../org/jivesoftware/smack/packet/Presence.Type.html" title="enum in org.jivesoftware.smack.packet">Presence.Type</A>&nbsp;type)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the type of the presence packet.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/smack/packet/Presence.html#toString()">toString</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/smack/packet/Presence.html#toXML()">toXML</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the packet as XML.</TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_org.jivesoftware.smack.packet.Packet"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Methods inherited from class org.jivesoftware.smack.packet.<A HREF="../../../../org/jivesoftware/smack/packet/Packet.html" title="class in org.jivesoftware.smack.packet">Packet</A></B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../../org/jivesoftware/smack/packet/Packet.html#addExtension(org.jivesoftware.smack.packet.PacketExtension)">addExtension</A>, <A HREF="../../../../org/jivesoftware/smack/packet/Packet.html#deleteProperty(java.lang.String)">deleteProperty</A>, <A HREF="../../../../org/jivesoftware/smack/packet/Packet.html#equals(java.lang.Object)">equals</A>, <A HREF="../../../../org/jivesoftware/smack/packet/Packet.html#getDefaultLanguage()">getDefaultLanguage</A>, <A HREF="../../../../org/jivesoftware/smack/packet/Packet.html#getError()">getError</A>, <A HREF="../../../../org/jivesoftware/smack/packet/Packet.html#getExtension(java.lang.String)">getExtension</A>, <A HREF="../../../../org/jivesoftware/smack/packet/Packet.html#getExtension(java.lang.String, java.lang.String)">getExtension</A>, <A HREF="../../../../org/jivesoftware/smack/packet/Packet.html#getExtensions()">getExtensions</A>, <A HREF="../../../../org/jivesoftware/smack/packet/Packet.html#getExtensionsXML()">getExtensionsXML</A>, <A HREF="../../../../org/jivesoftware/smack/packet/Packet.html#getFrom()">getFrom</A>, <A HREF="../../../../org/jivesoftware/smack/packet/Packet.html#getPacketID()">getPacketID</A>, <A HREF="../../../../org/jivesoftware/smack/packet/Packet.html#getProperty(java.lang.String)">getProperty</A>, <A HREF="../../../../org/jivesoftware/smack/packet/Packet.html#getPropertyNames()">getPropertyNames</A>, <A HREF="../../../../org/jivesoftware/smack/packet/Packet.html#getTo()">getTo</A>, <A HREF="../../../../org/jivesoftware/smack/packet/Packet.html#getXmlns()">getXmlns</A>, <A HREF="../../../../org/jivesoftware/smack/packet/Packet.html#hashCode()">hashCode</A>, <A HREF="../../../../org/jivesoftware/smack/packet/Packet.html#nextID()">nextID</A>, <A HREF="../../../../org/jivesoftware/smack/packet/Packet.html#parseXMLLang(java.lang.String)">parseXMLLang</A>, <A HREF="../../../../org/jivesoftware/smack/packet/Packet.html#removeExtension(org.jivesoftware.smack.packet.PacketExtension)">removeExtension</A>, <A HREF="../../../../org/jivesoftware/smack/packet/Packet.html#setDefaultXmlns(java.lang.String)">setDefaultXmlns</A>, <A HREF="../../../../org/jivesoftware/smack/packet/Packet.html#setError(org.jivesoftware.smack.packet.XMPPError)">setError</A>, <A HREF="../../../../org/jivesoftware/smack/packet/Packet.html#setFrom(java.lang.String)">setFrom</A>, <A HREF="../../../../org/jivesoftware/smack/packet/Packet.html#setPacketID(java.lang.String)">setPacketID</A>, <A HREF="../../../../org/jivesoftware/smack/packet/Packet.html#setProperty(java.lang.String, java.lang.Object)">setProperty</A>, <A HREF="../../../../org/jivesoftware/smack/packet/Packet.html#setTo(java.lang.String)">setTo</A></CODE></TD></TR></TABLE>&nbsp;<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.3/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.3/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.3/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.3/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD></TR></TABLE>&nbsp;<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="Presence(org.jivesoftware.smack.packet.Presence.Type)"><!-- --></A><H3>Presence</H3><PRE>public <B>Presence</B>(<A HREF="../../../../org/jivesoftware/smack/packet/Presence.Type.html" title="enum in org.jivesoftware.smack.packet">Presence.Type</A>&nbsp;type)</PRE><DL><DD>Creates a new presence update. Status, priority, and mode are left un-set.<P><DL><DT><B>Parameters:</B><DD><CODE>type</CODE> - the type.</DL></DL><HR><A NAME="Presence(org.jivesoftware.smack.packet.Presence.Type, java.lang.String, int, org.jivesoftware.smack.packet.Presence.Mode)"><!-- --></A><H3>Presence</H3><PRE>public <B>Presence</B>(<A HREF="../../../../org/jivesoftware/smack/packet/Presence.Type.html" title="enum in org.jivesoftware.smack.packet">Presence.Type</A>&nbsp;type,                <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;status,                int&nbsp;priority,                <A HREF="../../../../org/jivesoftware/smack/packet/Presence.Mode.html" title="enum in org.jivesoftware.smack.packet">Presence.Mode</A>&nbsp;mode)</PRE><DL><DD>Creates a new presence update with a specified status, priority, and mode.<P><DL><DT><B>Parameters:</B><DD><CODE>type</CODE> - the type.<DD><CODE>status</CODE> - a text message describing the presence update.<DD><CODE>priority</CODE> - the priority of this presence update.<DD><CODE>mode</CODE> - the mode type for this presence update.</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="isAvailable()"><!-- --></A><H3>isAvailable</H3><PRE>public boolean <B>isAvailable</B>()</PRE><DL><DD>Returns true if the <A HREF="../../../../org/jivesoftware/smack/packet/Presence.Type.html" title="enum in org.jivesoftware.smack.packet"><CODE>presence type</CODE></A> is available (online) and false if the user is unavailable (offline), or if this is a presence packet involved in a subscription operation. This is a convenience method equivalent to <tt>getType() == Presence.Type.available</tt>.<P><DD><DL><DT><B>Returns:</B><DD>true if the presence type is available.</DL></DD></DL><HR><A NAME="isAway()"><!-- --></A><H3>isAway</H3><PRE>public boolean <B>isAway</B>()</PRE><DL><DD>Returns true if the presence type is <A HREF="../../../../org/jivesoftware/smack/packet/Presence.Type.html#available"><CODE>available</CODE></A> and the presence mode is <A HREF="../../../../org/jivesoftware/smack/packet/Presence.Mode.html#away"><CODE>away</CODE></A>, <A HREF="../../../../org/jivesoftware/smack/packet/Presence.Mode.html#xa"><CODE>extended away</CODE></A>, or <A HREF="../../../../org/jivesoftware/smack/packet/Presence.Mode.html#dnd"><CODE>do not disturb</CODE></A>. False will be returned when the type or mode is any other value, including when the presence type is unavailable (offline). This is a convenience method equivalent to <tt>type == Type.available && (mode == Mode.away || mode == Mode.xa || mode == Mode.dnd)</tt>.<P><DD><DL><DT><B>Returns:</B><DD>true if the presence type is available and the presence mode is away, xa, or dnd.</DL></DD></DL><HR><A NAME="getType()"><!-- --></A><H3>getType</H3><PRE>public <A HREF="../../../../org/jivesoftware/smack/packet/Presence.Type.html" title="enum in org.jivesoftware.smack.packet">Presence.Type</A> <B>getType</B>()</PRE><DL><DD>Returns the type of this presence packet.<P><DD><DL>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -