filetransfernegotiator.html

来自「开源项目smack的API文件」· HTML 代码 · 共 550 行 · 第 1/3 页

HTML
550 行
字号
</DL><HR><A NAME="createIQ(java.lang.String, java.lang.String, java.lang.String, org.jivesoftware.smack.packet.IQ.Type)"><!-- --></A><H3>createIQ</H3><PRE>public static <A HREF="../../../../org/jivesoftware/smack/packet/IQ.html" title="class in org.jivesoftware.smack.packet">IQ</A> <B>createIQ</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;ID,                          <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;to,                          <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;from,                          <A HREF="../../../../org/jivesoftware/smack/packet/IQ.Type.html" title="class in org.jivesoftware.smack.packet">IQ.Type</A>&nbsp;type)</PRE><DL><DD>A convience method to create an IQ packet.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>ID</CODE> - The packet ID of the<DD><CODE>to</CODE> - To whom the packet is addressed.<DD><CODE>from</CODE> - From whom the packet is sent.<DD><CODE>type</CODE> - The iq type of the packet.<DT><B>Returns:</B><DD>The created IQ packet.</DL></DD></DL><HR><A NAME="getSupportedProtocols()"><!-- --></A><H3>getSupportedProtocols</H3><PRE>public static <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A> <B>getSupportedProtocols</B>()</PRE><DL><DD>Returns a collection of the supported transfer protocols.<P><DD><DL><DT><B>Returns:</B><DD>Returns a collection of the supported transfer protocols.</DL></DD></DL><HR><A NAME="selectStreamNegotiator(org.jivesoftware.smackx.filetransfer.FileTransferRequest)"><!-- --></A><H3>selectStreamNegotiator</H3><PRE>public <A HREF="../../../../org/jivesoftware/smackx/filetransfer/StreamNegotiator.html" title="class in org.jivesoftware.smackx.filetransfer">StreamNegotiator</A> <B>selectStreamNegotiator</B>(<A HREF="../../../../org/jivesoftware/smackx/filetransfer/FileTransferRequest.html" title="class in org.jivesoftware.smackx.filetransfer">FileTransferRequest</A>&nbsp;request)                                        throws <A HREF="../../../../org/jivesoftware/smack/XMPPException.html" title="class in org.jivesoftware.smack">XMPPException</A></PRE><DL><DD>Selects an appropriate stream negotiator after examining the incoming file transfer request.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>request</CODE> - The related file transfer request.<DT><B>Returns:</B><DD>The file transfer object that handles the transfer<DT><B>Throws:</B><DD><CODE><A HREF="../../../../org/jivesoftware/smack/XMPPException.html" title="class in org.jivesoftware.smack">XMPPException</A></CODE> - If there are either no stream methods contained in the packet, or                       there is not an appropriate stream method.</DL></DD></DL><HR><A NAME="rejectStream(org.jivesoftware.smackx.packet.StreamInitiation)"><!-- --></A><H3>rejectStream</H3><PRE>public void <B>rejectStream</B>(<A HREF="../../../../org/jivesoftware/smackx/packet/StreamInitiation.html" title="class in org.jivesoftware.smackx.packet">StreamInitiation</A>&nbsp;si)</PRE><DL><DD>Reject a stream initiation request from a remote user.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>si</CODE> - The Stream Initiation request to reject.</DL></DD></DL><HR><A NAME="getNextStreamID()"><!-- --></A><H3>getNextStreamID</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getNextStreamID</B>()</PRE><DL><DD>Returns a new, unique, stream ID to identify a file transfer.<P><DD><DL><DT><B>Returns:</B><DD>Returns a new, unique, stream ID to identify a file transfer.</DL></DD></DL><HR><A NAME="negotiateOutgoingTransfer(java.lang.String, java.lang.String, java.lang.String, long, java.lang.String, int)"><!-- --></A><H3>negotiateOutgoingTransfer</H3><PRE>public <A HREF="../../../../org/jivesoftware/smackx/filetransfer/StreamNegotiator.html" title="class in org.jivesoftware.smackx.filetransfer">StreamNegotiator</A> <B>negotiateOutgoingTransfer</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;userID,                                                  <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;streamID,                                                  <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;fileName,                                                  long&nbsp;size,                                                  <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;desc,                                                  int&nbsp;responseTimeout)                                           throws <A HREF="../../../../org/jivesoftware/smack/XMPPException.html" title="class in org.jivesoftware.smack">XMPPException</A></PRE><DL><DD>Send a request to another user to send them a file. The other user has the option of, accepting, rejecting, or not responding to a received file transfer request. <p/> If they accept, the packet will contain the other user's choosen stream type to send the file across. The two choices this implementation provides to the other user for file transfer are <a href="http://www.jabber.org/jeps/jep-0065.html">SOCKS5 Bytestreams</a>, which is the prefered method of transfer, and <a href="http://www.jabber.org/jeps/jep-0047.html">In-Band Bytestreams</a>, which is the fallback mechanism. <p/> The other user may choose to decline the file request if they do not desire the file, their client does not support JEP-0096, or if there are no acceptable means to transfer the file. <p/> Finally, if the other user does not respond this method will return null after the specified timeout.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>userID</CODE> - The userID of the user to whom the file will be sent.<DD><CODE>streamID</CODE> - The unique identifier for this file transfer.<DD><CODE>fileName</CODE> - The name of this file. Preferably it should include an                        extension as it is used to determine what type of file it is.<DD><CODE>size</CODE> - The size, in bytes, of the file.<DD><CODE>desc</CODE> - A description of the file.<DD><CODE>responseTimeout</CODE> - The amount of time, in milliseconds, to wait for the remote                        user to respond. If they do not respond in time, this<DT><B>Returns:</B><DD>Returns the stream negotiator selected by the peer.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../org/jivesoftware/smack/XMPPException.html" title="class in org.jivesoftware.smack">XMPPException</A></CODE> - Thrown if there is an error negotiating the file transfer.</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">  <TR ALIGN="center" VALIGN="top">  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Smack</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../../../org/jivesoftware/smackx/filetransfer/FileTransferManager.html" title="class in org.jivesoftware.smackx.filetransfer"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../../org/jivesoftware/smackx/filetransfer/FileTransferNegotiatorManager.html" title="interface in org.jivesoftware.smackx.filetransfer"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../../index.html?org/jivesoftware/smackx/filetransfer/FileTransferNegotiator.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="FileTransferNegotiator.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<SCRIPT type="text/javascript">  <!--  if(window==top) {    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');  }  //--></SCRIPT><NOSCRIPT>  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR><i>Copyright &copy; 2003-2007 Jive Software. </i></BODY></HTML>

⌨️ 快捷键说明

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