filetransfernegotiator.html

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

HTML
550 行
字号
<TD><CODE><B><A HREF="../../../../org/jivesoftware/smackx/filetransfer/FileTransferNegotiator.html#getNextStreamID()">getNextStreamID</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a new, unique, stream ID to identify a file transfer.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/smackx/filetransfer/FileTransferNegotiator.html#getSupportedProtocols()">getSupportedProtocols</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a collection of the supported transfer protocols.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/smackx/filetransfer/FileTransferNegotiator.html#isServiceEnabled(org.jivesoftware.smack.XMPPConnection)">isServiceEnabled</A></B>(<A HREF="../../../../org/jivesoftware/smack/XMPPConnection.html" title="class in org.jivesoftware.smack">XMPPConnection</A>&nbsp;connection)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Checks to see if all file transfer related services are enabled on the connection.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../../org/jivesoftware/smackx/filetransfer/StreamNegotiator.html" title="class in org.jivesoftware.smackx.filetransfer">StreamNegotiator</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/smackx/filetransfer/FileTransferNegotiator.html#negotiateOutgoingTransfer(java.lang.String, java.lang.String, java.lang.String, long, java.lang.String, int)">negotiateOutgoingTransfer</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;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)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Send a request to another user to send them a file.</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/smackx/filetransfer/FileTransferNegotiator.html#rejectStream(org.jivesoftware.smackx.packet.StreamInitiation)">rejectStream</A></B>(<A HREF="../../../../org/jivesoftware/smackx/packet/StreamInitiation.html" title="class in org.jivesoftware.smackx.packet">StreamInitiation</A>&nbsp;si)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reject a stream initiation request from a remote user.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../../org/jivesoftware/smackx/filetransfer/StreamNegotiator.html" title="class in org.jivesoftware.smackx.filetransfer">StreamNegotiator</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/smackx/filetransfer/FileTransferNegotiator.html#selectStreamNegotiator(org.jivesoftware.smackx.filetransfer.FileTransferRequest)">selectStreamNegotiator</A></B>(<A HREF="../../../../org/jivesoftware/smackx/filetransfer/FileTransferRequest.html" title="class in org.jivesoftware.smackx.filetransfer">FileTransferRequest</A>&nbsp;request)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Selects an appropriate stream negotiator after examining the incoming file transfer request.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/smackx/filetransfer/FileTransferNegotiator.html#setServiceEnabled(org.jivesoftware.smack.XMPPConnection, boolean)">setServiceEnabled</A></B>(<A HREF="../../../../org/jivesoftware/smack/XMPPConnection.html" title="class in org.jivesoftware.smack">XMPPConnection</A>&nbsp;connection,                  boolean&nbsp;isEnabled)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Enable the Jabber services related to file transfer on the particular connection.</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#equals(java.lang.Object)" title="class or interface in java.lang">equals</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#hashCode()" title="class or interface in java.lang">hashCode</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#toString()" title="class or interface in java.lang">toString</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><!-- ============ FIELD DETAIL =========== --><A NAME="field_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>Field Detail</B></FONT></TH></TR></TABLE><A NAME="BYTE_STREAM"><!-- --></A><H3>BYTE_STREAM</H3><PRE>public static final <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>BYTE_STREAM</B></PRE><DL><DD>The XMPP namespace of the SOCKS5 bytestream<P><DL><DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.jivesoftware.smackx.filetransfer.FileTransferNegotiator.BYTE_STREAM">Constant Field Values</A></DL></DL><HR><A NAME="INBAND_BYTE_STREAM"><!-- --></A><H3>INBAND_BYTE_STREAM</H3><PRE>public static final <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>INBAND_BYTE_STREAM</B></PRE><DL><DD>The XMPP namespace of the In-Band bytestream<P><DL><DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.jivesoftware.smackx.filetransfer.FileTransferNegotiator.INBAND_BYTE_STREAM">Constant Field Values</A></DL></DL><HR><A NAME="STREAM_DATA_FIELD_NAME"><!-- --></A><H3>STREAM_DATA_FIELD_NAME</H3><PRE>protected static final <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>STREAM_DATA_FIELD_NAME</B></PRE><DL><DL><DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.jivesoftware.smackx.filetransfer.FileTransferNegotiator.STREAM_DATA_FIELD_NAME">Constant Field Values</A></DL></DL><HR><A NAME="IBB_ONLY"><!-- --></A><H3>IBB_ONLY</H3><PRE>public static boolean <B>IBB_ONLY</B></PRE><DL><DD>A static variable to use only offer IBB for file transfer. It is generally recommend to only set this variable to true for testing purposes as IBB is the backup file transfer method and shouldn't be used as the only transfer method in production systems.<P><DL></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="getInstanceFor(org.jivesoftware.smack.XMPPConnection)"><!-- --></A><H3>getInstanceFor</H3><PRE>public static <A HREF="../../../../org/jivesoftware/smackx/filetransfer/FileTransferNegotiator.html" title="class in org.jivesoftware.smackx.filetransfer">FileTransferNegotiator</A> <B>getInstanceFor</B>(<A HREF="../../../../org/jivesoftware/smack/XMPPConnection.html" title="class in org.jivesoftware.smack">XMPPConnection</A>&nbsp;connection)</PRE><DL><DD>Returns the file transfer negotiator related to a particular connection. When this class is requested on a particular connection the file transfer service is automatically enabled.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>connection</CODE> - The connection for which the transfer manager is desired<DT><B>Returns:</B><DD>The IMFileTransferManager</DL></DD></DL><HR><A NAME="setServiceEnabled(org.jivesoftware.smack.XMPPConnection, boolean)"><!-- --></A><H3>setServiceEnabled</H3><PRE>public static void <B>setServiceEnabled</B>(<A HREF="../../../../org/jivesoftware/smack/XMPPConnection.html" title="class in org.jivesoftware.smack">XMPPConnection</A>&nbsp;connection,                                     boolean&nbsp;isEnabled)</PRE><DL><DD>Enable the Jabber services related to file transfer on the particular connection.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>connection</CODE> - The connection on which to enable or disable the services.<DD><CODE>isEnabled</CODE> - True to enable, false to disable.</DL></DD></DL><HR><A NAME="isServiceEnabled(org.jivesoftware.smack.XMPPConnection)"><!-- --></A><H3>isServiceEnabled</H3><PRE>public static boolean <B>isServiceEnabled</B>(<A HREF="../../../../org/jivesoftware/smack/XMPPConnection.html" title="class in org.jivesoftware.smack">XMPPConnection</A>&nbsp;connection)</PRE><DL><DD>Checks to see if all file transfer related services are enabled on the connection.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>connection</CODE> - The connection to check<DT><B>Returns:</B><DD>True if all related services are enabled, false if they are not.</DL></DD>

⌨️ 快捷键说明

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