📄 workgroup.html
字号:
<PRE>public void <B>joinQueue</B>() throws <A HREF="../../../../../org/jivesoftware/smack/XMPPException.html" title="class in org.jivesoftware.smack">XMPPException</A></PRE><DL><DD>Joins the workgroup queue to wait to be routed to an agent. After joining the queue, queue status events will be sent to indicate the user's position and estimated time left in the queue. Once joining the queue, there are three ways the user can leave the queue: <ul> <p/> <li>The user is routed to an agent, which triggers a GroupChat invitation. <li>The user asks to leave the queue by calling the <A HREF="../../../../../org/jivesoftware/smackx/workgroup/user/Workgroup.html#departQueue()"><CODE>departQueue()</CODE></A> method. <li>A server error occurs, or an administrator explicitly removes the user from the queue. </ul> <p/> A user cannot request to join the queue again if already in the queue. Therefore, this method will throw an IllegalStateException if the user is already in the queue.<p> <p/> Some servers may be configured to require certain meta-data in order to join the queue. In that case, the <A HREF="../../../../../org/jivesoftware/smackx/workgroup/user/Workgroup.html#joinQueue(org.jivesoftware.smackx.Form)"><CODE>joinQueue(Form)</CODE></A> method should be used instead of this method so that meta-data may be passed in.<p> <p/> The server tracks the conversations that a user has with agents over time. By default, that tracking is done using the user's JID. However, this is not always possible. For example, when the user is logged in anonymously using a web client. In that case the user ID might be a randomly generated value put into a persistent cookie or a username obtained via the session. A userID can be explicitly passed in by using the <A HREF="../../../../../org/jivesoftware/smackx/workgroup/user/Workgroup.html#joinQueue(org.jivesoftware.smackx.Form, java.lang.String)"><CODE>joinQueue(Form, String)</CODE></A> method. When specified, that userID will be used instead of the user's JID to track conversations. The server will ignore a manually specified userID if the user's connection to the server is not anonymous.<P><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../../../../org/jivesoftware/smack/XMPPException.html" title="class in org.jivesoftware.smack">XMPPException</A></CODE> - if an error occured joining the queue. An error may indicate that a connection failure occured or that the server explicitly rejected the request to join the queue.</DL></DD></DL><HR><A NAME="joinQueue(org.jivesoftware.smackx.Form)"><!-- --></A><H3>joinQueue</H3><PRE>public void <B>joinQueue</B>(<A HREF="../../../../../org/jivesoftware/smackx/Form.html" title="class in org.jivesoftware.smackx">Form</A> answerForm) throws <A HREF="../../../../../org/jivesoftware/smack/XMPPException.html" title="class in org.jivesoftware.smack">XMPPException</A></PRE><DL><DD>Joins the workgroup queue to wait to be routed to an agent. After joining the queue, queue status events will be sent to indicate the user's position and estimated time left in the queue. Once joining the queue, there are three ways the user can leave the queue: <ul> <p/> <li>The user is routed to an agent, which triggers a GroupChat invitation. <li>The user asks to leave the queue by calling the <A HREF="../../../../../org/jivesoftware/smackx/workgroup/user/Workgroup.html#departQueue()"><CODE>departQueue()</CODE></A> method. <li>A server error occurs, or an administrator explicitly removes the user from the queue. </ul> <p/> A user cannot request to join the queue again if already in the queue. Therefore, this method will throw an IllegalStateException if the user is already in the queue.<p> <p/> Some servers may be configured to require certain meta-data in order to join the queue.<p> <p/> The server tracks the conversations that a user has with agents over time. By default, that tracking is done using the user's JID. However, this is not always possible. For example, when the user is logged in anonymously using a web client. In that case the user ID might be a randomly generated value put into a persistent cookie or a username obtained via the session. A userID can be explicitly passed in by using the <A HREF="../../../../../org/jivesoftware/smackx/workgroup/user/Workgroup.html#joinQueue(org.jivesoftware.smackx.Form, java.lang.String)"><CODE>joinQueue(Form, String)</CODE></A> method. When specified, that userID will be used instead of the user's JID to track conversations. The server will ignore a manually specified userID if the user's connection to the server is not anonymous.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>answerForm</CODE> - the completed form the send for the join request.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../../org/jivesoftware/smack/XMPPException.html" title="class in org.jivesoftware.smack">XMPPException</A></CODE> - if an error occured joining the queue. An error may indicate that a connection failure occured or that the server explicitly rejected the request to join the queue.</DL></DD></DL><HR><A NAME="joinQueue(org.jivesoftware.smackx.Form, java.lang.String)"><!-- --></A><H3>joinQueue</H3><PRE>public void <B>joinQueue</B>(<A HREF="../../../../../org/jivesoftware/smackx/Form.html" title="class in org.jivesoftware.smackx">Form</A> answerForm, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> userID) throws <A HREF="../../../../../org/jivesoftware/smack/XMPPException.html" title="class in org.jivesoftware.smack">XMPPException</A></PRE><DL><DD><p>Joins the workgroup queue to wait to be routed to an agent. After joining the queue, queue status events will be sent to indicate the user's position and estimated time left in the queue. Once joining the queue, there are three ways the user can leave the queue: <ul> <p/> <li>The user is routed to an agent, which triggers a GroupChat invitation. <li>The user asks to leave the queue by calling the <A HREF="../../../../../org/jivesoftware/smackx/workgroup/user/Workgroup.html#departQueue()"><CODE>departQueue()</CODE></A> method. <li>A server error occurs, or an administrator explicitly removes the user from the queue. </ul> <p/> A user cannot request to join the queue again if already in the queue. Therefore, this method will throw an IllegalStateException if the user is already in the queue.<p> <p/> Some servers may be configured to require certain meta-data in order to join the queue.<p> <p/> The server tracks the conversations that a user has with agents over time. By default, that tracking is done using the user's JID. However, this is not always possible. For example, when the user is logged in anonymously using a web client. In that case the user ID might be a randomly generated value put into a persistent cookie or a username obtained via the session. When specified, that userID will be used instead of the user's JID to track conversations. The server will ignore a manually specified userID if the user's connection to the server is not anonymous.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>answerForm</CODE> - the completed form associated with the join reqest.<DD><CODE>userID</CODE> - String that represents the ID of the user when using anonymous sessions or <tt>null</tt> if a userID should not be used.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../../org/jivesoftware/smack/XMPPException.html" title="class in org.jivesoftware.smack">XMPPException</A></CODE> - if an error occured joining the queue. An error may indicate that a connection failure occured or that the server explicitly rejected the request to join the queue.</DL></DD></DL><HR><A NAME="joinQueue(java.util.Map, java.lang.String)"><!-- --></A><H3>joinQueue</H3><PRE>public void <B>joinQueue</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Map.html" title="class or interface in java.util">Map</A> metadata, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> userID) throws <A HREF="../../../../../org/jivesoftware/smack/XMPPException.html" title="class in org.jivesoftware.smack">XMPPException</A></PRE><DL><DD><p>Joins the workgroup queue to wait to be routed to an agent. After joining the queue, queue status events will be sent to indicate the user's position and estimated time left in the queue. Once joining the queue, there are three ways the user can leave the queue: <ul> <p/> <li>The user is routed to an agent, which triggers a GroupChat invitation. <li>The user asks to leave the queue by calling the <A HREF="../../../../../org/jivesoftware/smackx/workgroup/user/Workgroup.html#departQueue()"><CODE>departQueue()</CODE></A> method. <li>A server error occurs, or an administrator explicitly removes the user from the queue. </ul> <p/> A user cannot request to join the queue again if already in the queue. Therefore, this method will throw an IllegalStateException if the user is already in the queue.<p> <p/> Some servers may be configured to require certain meta-data in order to join the queue.<p> <p/> The server tracks the conversations that a user has with agents over time. By default, that tracking is done using the user's JID. However, this is not always possible. For example, when the user is logged in anonymously using a web client. In that case the user ID might be a randomly generated value put into a persistent cookie or a username obtained via the session. When specified, that userID will be used instead of the user's JID to track conversations. The server will ignore a manually specified userID if the user's connection to the server is not anonymous.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>metadata</CODE> - metadata to create a dataform from.<DD><CODE>userID</CODE> - String that represents the ID of the user when using anonymous sessions or <tt>null</tt> if a userID should not be used.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../../org/jivesoftware/smack/XMPPException.html" title="class in org.jivesoftware.smack">XMPPException</A></CODE> - if an error occured joining the queue. An error may indicate that a connection failure occured or that the server explicitly rejected the request to join the queue.</DL></DD></DL><HR><A NAME="departQueue()"><!-- --></A><H3>departQueue</H3><PRE>public void <B>departQueue</B>() throws <A HREF="../../../../../org/jivesoftware/smack/XMPPException.html" title="class in org.jivesoftware.smack">XMPPException</A></PRE><DL><DD>Departs the workgroup queue. If the user is not currently in the queue, this method will do nothing.<p> <p/> Normally, the user would not manually leave the queue. However, they may wish to under certain circumstances -- for example, if they no longer wish to be routed to an agent because they've been waiting too long.<P><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../../../../org/jivesoftware/smack/XMPPException.html" title="class in org.jivesoftware.smack">XMPPException</A></CODE> - if an error occured trying to send the depart queue request to the server.</DL></DD></DL><HR><A NAME="addQueueListener(org.jivesoftware.smackx.workgroup.user.QueueListener)"><!-- --></A><H3>addQueueListener</H3><PRE>public void <B>addQueueListener</B>(<A HREF="../../../../../org/jivesoftware/smackx/workgroup/user/QueueListener.html" title="interface in org.jivesoftware.smackx.workgroup.user">QueueListener</A> queueListener)</PRE><DL><DD>Adds a queue listener that will be notified of queue events for the user that created this Workgroup instance.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>queueListener</CODE> - the queue listener.</DL></DD></DL><HR><A NAME="removeQueueListener(org.jivesoftware.smackx.workgroup.user.QueueListener)"><!-- --></A><H3>removeQueueListener</H3><PRE>public void <B>removeQueueListener</B>(<A HREF="../../../../../org/jivesoftware/smackx/workgroup/user/QueueListener.html" title="interface in org.jivesoftware.smackx.workgroup.user">QueueListener</A> queueListener)</PRE><DL><DD>Removes a queue listener.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>queueListener</CODE> - the queue listener.</DL></DD></DL><HR><A NAME="addInvitationListener(org.jivesoftware.smackx.workgroup.WorkgroupInvitationListener)"><!-- --></A><H3>addInvitationListener</H3><PRE>public void <B>addInvitationListener</B>(<A HREF="../../../../../org/jivesoftware/smackx/workgroup/WorkgroupInvitationListener.html" title="interface in org.jivesoftware.smackx.workgroup">WorkgroupInvitationListener</A> invitationListener)</PRE><DL><DD>Adds an invitation listener that will be notified of groupchat invitations from the workgroup for the the user that created this Workgroup instance.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>invitationListener</CODE> - the invitation listener.</DL></DD></DL>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -