FreePastry/docs/javadoc/org/mpisws/p2p/filetransfer/FileTransferImpl.html

1550 lines
68 KiB
HTML
Raw Normal View History

2019-05-13 16:45:05 +04:00
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_07) on Fri Mar 13 20:01:33 CET 2009 -->
<TITLE>
FileTransferImpl (Rice Pastry - API Specifications)
</TITLE>
<META NAME="date" CONTENT="2009-03-13">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="FileTransferImpl (Rice Pastry - API Specifications)";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" 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_top_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="class-use/FileTransferImpl.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&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>
Rice Pastry API</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferCallback.html" title="interface in org.mpisws.p2p.filetransfer"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferListener.html" title="interface in org.mpisws.p2p.filetransfer"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?org/mpisws/p2p/filetransfer/FileTransferImpl.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="FileTransferImpl.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;<A HREF="#constructor_summary">CONSTR</A>&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;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.mpisws.p2p.filetransfer</FONT>
<BR>
Class FileTransferImpl</H2>
<PRE>
java.lang.Object
<IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.mpisws.p2p.filetransfer.FileTransferImpl</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransfer.html" title="interface in org.mpisws.p2p.filetransfer">FileTransfer</A>, <A HREF="../../../../rice/p2p/commonapi/appsocket/AppSocketReceiver.html" title="interface in rice.p2p.commonapi.appsocket">AppSocketReceiver</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public class <B>FileTransferImpl</B><DT>extends java.lang.Object<DT>implements <A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransfer.html" title="interface in org.mpisws.p2p.filetransfer">FileTransfer</A>, <A HREF="../../../../rice/p2p/commonapi/appsocket/AppSocketReceiver.html" title="interface in rice.p2p.commonapi.appsocket">AppSocketReceiver</A></DL>
</PRE>
<P>
TODO: implement read, write
<P>
<P>
<DL>
<DT><B>Author:</B></DT>
<DD>Jeff Hoye</DD>
</DL>
<HR>
<P>
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferCallback.html" title="interface in org.mpisws.p2p.filetransfer">FileTransferCallback</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferImpl.html#callback">callback</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>static&nbsp;byte</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferImpl.html#CANCEL_PRIORITY">CANCEL_PRIORITY</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>protected &nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferImpl.html#CHUNK_SIZE">CHUNK_SIZE</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Max size of a message, (the size that can't be preempted)</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;byte</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferImpl.html#DEFAULT_PRIORITY">DEFAULT_PRIORITY</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>protected &nbsp;<A HREF="../../../../rice/environment/Environment.html" title="class in rice.environment">Environment</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferImpl.html#environment">environment</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>protected &nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferImpl.html#FILE_CACHE">FILE_CACHE</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Number of chunks to keep in memory per file.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="../../../../org/mpisws/p2p/filetransfer/FileAllocationStrategy.html" title="interface in org.mpisws.p2p.filetransfer">FileAllocationStrategy</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferImpl.html#fileAllocater">fileAllocater</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;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferImpl.html#fileChunksInMemory">fileChunksInMemory</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Synchronized by only being mutated/checked on selector thread
can be reading when < MAX_PENDING_CHUNKS, allowed to be greater</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;byte</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferImpl.html#HIGH_PRIORITY">HIGH_PRIORITY</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>protected &nbsp;<A HREF="../../../../rice/environment/logging/Logger.html" title="class in rice.environment.logging">Logger</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferImpl.html#logger">logger</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>static&nbsp;byte</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferImpl.html#LOW_PRIORITY">LOW_PRIORITY</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>static&nbsp;byte</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferImpl.html#LOWEST_PRIORITY">LOWEST_PRIORITY</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>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferImpl.html#MAX_FILE_CHUNKS_IN_MEMORY">MAX_FILE_CHUNKS_IN_MEMORY</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>static&nbsp;byte</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferImpl.html#MAX_PRIORITY">MAX_PRIORITY</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>static&nbsp;byte</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferImpl.html#MEDIUM_HIGH_PRIORITY">MEDIUM_HIGH_PRIORITY</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>static&nbsp;byte</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferImpl.html#MEDIUM_LOW_PRIORITY">MEDIUM_LOW_PRIORITY</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>static&nbsp;byte</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferImpl.html#MEDIUM_PRIORITY">MEDIUM_PRIORITY</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>static&nbsp;byte</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferImpl.html#MSG_BB_HEADER">MSG_BB_HEADER</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Contains int UID, int length</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;byte</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferImpl.html#MSG_CANCEL">MSG_CANCEL</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Contains int UID</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;byte</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferImpl.html#MSG_CANCEL_REQUEST">MSG_CANCEL_REQUEST</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Contains int UID</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;byte</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferImpl.html#MSG_CHUNK">MSG_CHUNK</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Contains int UID, int chunk_length, byte[chunk_length] msg</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;byte</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferImpl.html#MSG_FILE_HEADER">MSG_FILE_HEADER</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Contains int UID, long offset, long length, int nameLength, UTF name</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="../../../../rice/environment/processing/Processor.html" title="interface in rice.environment.processing">Processor</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferImpl.html#processor">processor</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>protected &nbsp;<A HREF="../../../../rice/selector/SelectorManager.html" title="class in rice.selector">SelectorManager</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferImpl.html#selectorManager">selectorManager</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>protected &nbsp;<A HREF="../../../../rice/p2p/commonapi/appsocket/AppSocket.html" title="interface in rice.p2p.commonapi.appsocket">AppSocket</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferImpl.html#socket">socket</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferImpl.html#FileTransferImpl(rice.p2p.commonapi.appsocket.AppSocket, org.mpisws.p2p.filetransfer.FileTransferCallback, rice.environment.Environment)">FileTransferImpl</A></B>(<A HREF="../../../../rice/p2p/commonapi/appsocket/AppSocket.html" title="interface in rice.p2p.commonapi.appsocket">AppSocket</A>&nbsp;socket,
<A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferCallback.html" title="interface in org.mpisws.p2p.filetransfer">FileTransferCallback</A>&nbsp;callback,
<A HREF="../../../../rice/environment/Environment.html" title="class in rice.environment">Environment</A>&nbsp;env)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferImpl.html#FileTransferImpl(rice.p2p.commonapi.appsocket.AppSocket, org.mpisws.p2p.filetransfer.FileTransferCallback, org.mpisws.p2p.filetransfer.FileAllocationStrategy, rice.environment.Environment)">FileTransferImpl</A></B>(<A HREF="../../../../rice/p2p/commonapi/appsocket/AppSocket.html" title="interface in rice.p2p.commonapi.appsocket">AppSocket</A>&nbsp;socket,
<A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferCallback.html" title="interface in org.mpisws.p2p.filetransfer">FileTransferCallback</A>&nbsp;callback,
<A HREF="../../../../org/mpisws/p2p/filetransfer/FileAllocationStrategy.html" title="interface in org.mpisws.p2p.filetransfer">FileAllocationStrategy</A>&nbsp;fileAllocater,
<A HREF="../../../../rice/environment/Environment.html" title="class in rice.environment">Environment</A>&nbsp;env)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferImpl.html#FileTransferImpl(rice.p2p.commonapi.appsocket.AppSocket, org.mpisws.p2p.filetransfer.FileTransferCallback, org.mpisws.p2p.filetransfer.FileAllocationStrategy, rice.environment.Environment, rice.environment.processing.Processor)">FileTransferImpl</A></B>(<A HREF="../../../../rice/p2p/commonapi/appsocket/AppSocket.html" title="interface in rice.p2p.commonapi.appsocket">AppSocket</A>&nbsp;socket,
<A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferCallback.html" title="interface in org.mpisws.p2p.filetransfer">FileTransferCallback</A>&nbsp;callback,
<A HREF="../../../../org/mpisws/p2p/filetransfer/FileAllocationStrategy.html" title="interface in org.mpisws.p2p.filetransfer">FileAllocationStrategy</A>&nbsp;fileAllocater,
<A HREF="../../../../rice/environment/Environment.html" title="class in rice.environment">Environment</A>&nbsp;env,
<A HREF="../../../../rice/environment/processing/Processor.html" title="interface in rice.environment.processing">Processor</A>&nbsp;p)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferImpl.html#FileTransferImpl(rice.p2p.commonapi.appsocket.AppSocket, org.mpisws.p2p.filetransfer.FileTransferCallback, org.mpisws.p2p.filetransfer.FileAllocationStrategy, rice.environment.Environment, rice.environment.processing.Processor, int, int)">FileTransferImpl</A></B>(<A HREF="../../../../rice/p2p/commonapi/appsocket/AppSocket.html" title="interface in rice.p2p.commonapi.appsocket">AppSocket</A>&nbsp;socket,
<A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferCallback.html" title="interface in org.mpisws.p2p.filetransfer">FileTransferCallback</A>&nbsp;callback,
<A HREF="../../../../org/mpisws/p2p/filetransfer/FileAllocationStrategy.html" title="interface in org.mpisws.p2p.filetransfer">FileAllocationStrategy</A>&nbsp;fileAllocater,
<A HREF="../../../../rice/environment/Environment.html" title="class in rice.environment">Environment</A>&nbsp;env,
<A HREF="../../../../rice/environment/processing/Processor.html" title="interface in rice.environment.processing">Processor</A>&nbsp;p,
int&nbsp;chunkSize,
int&nbsp;numChunksToWriteToNetwork)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</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/mpisws/p2p/filetransfer/FileTransferImpl.html#addIncomingFile(int, byte[], long, long)">addIncomingFile</A></B>(int&nbsp;uid,
byte[]&nbsp;metadata,
long&nbsp;offset,
long&nbsp;length)</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;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferImpl.html#addIncomingMessage(int, int)">addIncomingMessage</A></B>(int&nbsp;uid,
int&nbsp;size)</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;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferImpl.html#addListener(org.mpisws.p2p.filetransfer.FileTransferListener)">addListener</A></B>(<A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferListener.html" title="interface in org.mpisws.p2p.filetransfer">FileTransferListener</A>&nbsp;listener)</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>protected &nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferImpl.html#complete(org.mpisws.p2p.filetransfer.FileTransferImpl.MessageWrapper)">complete</A></B>(org.mpisws.p2p.filetransfer.FileTransferImpl.MessageWrapper&nbsp;wrapper)</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>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferImpl.html#decrementFileChunksInMemory()">decrementFileChunksInMemory</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;java.lang.Iterable&lt;<A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferListener.html" title="interface in org.mpisws.p2p.filetransfer">FileTransferListener</A>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferImpl.html#getListeners()">getListeners</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>protected &nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferImpl.html#getUid()">getUid</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>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferImpl.html#incrementFileChunksInMemory()">incrementFileChunksInMemory</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>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferImpl.html#notifyListenersReceiveFileProgress(org.mpisws.p2p.filetransfer.FileReceipt, long, long)">notifyListenersReceiveFileProgress</A></B>(<A HREF="../../../../org/mpisws/p2p/filetransfer/FileReceipt.html" title="interface in org.mpisws.p2p.filetransfer">FileReceipt</A>&nbsp;receipt,
long&nbsp;bytesReceived,
long&nbsp;bytesTotal)</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>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferImpl.html#notifyListenersReceiveMsgProgress(org.mpisws.p2p.filetransfer.BBReceipt, int, int)">notifyListenersReceiveMsgProgress</A></B>(<A HREF="../../../../org/mpisws/p2p/filetransfer/BBReceipt.html" title="interface in org.mpisws.p2p.filetransfer">BBReceipt</A>&nbsp;receipt,
int&nbsp;bytesReceived,
int&nbsp;bytesTotal)</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>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferImpl.html#notifyListenersReceiverCancelled(org.mpisws.p2p.filetransfer.Receipt)">notifyListenersReceiverCancelled</A></B>(<A HREF="../../../../org/mpisws/p2p/filetransfer/Receipt.html" title="interface in org.mpisws.p2p.filetransfer">Receipt</A>&nbsp;receipt)</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>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferImpl.html#notifyListenersSenderCancelled(org.mpisws.p2p.filetransfer.FileTransferImpl.DataReader)">notifyListenersSenderCancelled</A></B>(org.mpisws.p2p.filetransfer.FileTransferImpl.DataReader&nbsp;receipt)</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>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferImpl.html#notifyListenersSendFileProgress(org.mpisws.p2p.filetransfer.FileReceipt, long, long)">notifyListenersSendFileProgress</A></B>(<A HREF="../../../../org/mpisws/p2p/filetransfer/FileReceipt.html" title="interface in org.mpisws.p2p.filetransfer">FileReceipt</A>&nbsp;receipt,
long&nbsp;bytesSent,
long&nbsp;bytesTotal)</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>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferImpl.html#notifyListenersSendMsgProgress(org.mpisws.p2p.filetransfer.BBReceipt, int, int)">notifyListenersSendMsgProgress</A></B>(<A HREF="../../../../org/mpisws/p2p/filetransfer/BBReceipt.html" title="interface in org.mpisws.p2p.filetransfer">BBReceipt</A>&nbsp;receipt,
int&nbsp;bytesSent,
int&nbsp;bytesTotal)</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>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferImpl.html#notifyListenersTransferFailed(org.mpisws.p2p.filetransfer.Receipt, boolean)">notifyListenersTransferFailed</A></B>(<A HREF="../../../../org/mpisws/p2p/filetransfer/Receipt.html" title="interface in org.mpisws.p2p.filetransfer">Receipt</A>&nbsp;receipt,
boolean&nbsp;incoming)</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>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferImpl.html#purge()">purge</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;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferImpl.html#receiveException(rice.p2p.commonapi.appsocket.AppSocket, java.lang.Exception)">receiveException</A></B>(<A HREF="../../../../rice/p2p/commonapi/appsocket/AppSocket.html" title="interface in rice.p2p.commonapi.appsocket">AppSocket</A>&nbsp;socket,
java.lang.Exception&nbsp;e)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Called when there is an error</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferImpl.html#receiverCancelled(int)">receiverCancelled</A></B>(int&nbsp;uid)</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;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferImpl.html#receiveSelectResult(rice.p2p.commonapi.appsocket.AppSocket, boolean, boolean)">receiveSelectResult</A></B>(<A HREF="../../../../rice/p2p/commonapi/appsocket/AppSocket.html" title="interface in rice.p2p.commonapi.appsocket">AppSocket</A>&nbsp;socket,
boolean&nbsp;canRead,
boolean&nbsp;canWrite)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Called when a socket is available for read/write</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/mpisws/p2p/filetransfer/FileTransferImpl.html#receiveSocket(rice.p2p.commonapi.appsocket.AppSocket)">receiveSocket</A></B>(<A HREF="../../../../rice/p2p/commonapi/appsocket/AppSocket.html" title="interface in rice.p2p.commonapi.appsocket">AppSocket</A>&nbsp;socket)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Called when we have a new socket (due to a call to connect or accept)</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/mpisws/p2p/filetransfer/FileTransferImpl.html#registerToReadIfPossible()">registerToReadIfPossible</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;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferImpl.html#removeListener(org.mpisws.p2p.filetransfer.FileTransferListener)">removeListener</A></B>(<A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferListener.html" title="interface in org.mpisws.p2p.filetransfer">FileTransferListener</A>&nbsp;listener)</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>protected &nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferImpl.html#requestCancel(int)">requestCancel</A></B>(int&nbsp;uid)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Only call this on the receiver side, b/c uid is simplex</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferImpl.html#scheduleToWriteIfNeeded()">scheduleToWriteIfNeeded</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Must be called on selectorManager.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferImpl.html#sendCancel(int)">sendCancel</A></B>(int&nbsp;uid)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Only call this on the sender side, b/c uid is simplex</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferImpl.html#senderCancelled(int)">senderCancelled</A></B>(int&nbsp;uid)</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="../../../../org/mpisws/p2p/filetransfer/FileReceipt.html" title="interface in org.mpisws.p2p.filetransfer">FileReceipt</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferImpl.html#sendFile(java.io.File, java.nio.ByteBuffer, byte, rice.Continuation)">sendFile</A></B>(java.io.File&nbsp;f,
java.nio.ByteBuffer&nbsp;metadata,
byte&nbsp;priority,
<A HREF="../../../../rice/Continuation.html" title="interface in rice">Continuation</A>&lt;<A HREF="../../../../org/mpisws/p2p/filetransfer/FileReceipt.html" title="interface in org.mpisws.p2p.filetransfer">FileReceipt</A>,java.lang.Exception&gt;&nbsp;c)</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="../../../../org/mpisws/p2p/filetransfer/FileReceipt.html" title="interface in org.mpisws.p2p.filetransfer">FileReceipt</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferImpl.html#sendFile(java.io.File, java.nio.ByteBuffer, byte, long, long, rice.Continuation)">sendFile</A></B>(java.io.File&nbsp;f,
java.nio.ByteBuffer&nbsp;metadataBB,
byte&nbsp;priority,
long&nbsp;offset,
long&nbsp;length,
<A HREF="../../../../rice/Continuation.html" title="interface in rice">Continuation</A>&lt;<A HREF="../../../../org/mpisws/p2p/filetransfer/FileReceipt.html" title="interface in org.mpisws.p2p.filetransfer">FileReceipt</A>,java.lang.Exception&gt;&nbsp;c)</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="../../../../org/mpisws/p2p/filetransfer/BBReceipt.html" title="interface in org.mpisws.p2p.filetransfer">BBReceipt</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferImpl.html#sendMsg(java.nio.ByteBuffer, byte, rice.Continuation)">sendMsg</A></B>(java.nio.ByteBuffer&nbsp;bb,
byte&nbsp;priority,
<A HREF="../../../../rice/Continuation.html" title="interface in rice">Continuation</A>&lt;<A HREF="../../../../org/mpisws/p2p/filetransfer/BBReceipt.html" title="interface in org.mpisws.p2p.filetransfer">BBReceipt</A>,java.lang.Exception&gt;&nbsp;c)</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>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferImpl.html#socketClosed()">socketClosed</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</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.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</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="MSG_FILE_HEADER"><!-- --></A><H3>
MSG_FILE_HEADER</H3>
<PRE>
public static final byte <B>MSG_FILE_HEADER</B></PRE>
<DL>
<DD>Contains int UID, long offset, long length, int nameLength, UTF name
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.mpisws.p2p.filetransfer.FileTransferImpl.MSG_FILE_HEADER">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="MSG_BB_HEADER"><!-- --></A><H3>
MSG_BB_HEADER</H3>
<PRE>
public static final byte <B>MSG_BB_HEADER</B></PRE>
<DL>
<DD>Contains int UID, int length
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.mpisws.p2p.filetransfer.FileTransferImpl.MSG_BB_HEADER">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="MSG_CHUNK"><!-- --></A><H3>
MSG_CHUNK</H3>
<PRE>
public static final byte <B>MSG_CHUNK</B></PRE>
<DL>
<DD>Contains int UID, int chunk_length, byte[chunk_length] msg
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.mpisws.p2p.filetransfer.FileTransferImpl.MSG_CHUNK">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="MSG_CANCEL"><!-- --></A><H3>
MSG_CANCEL</H3>
<PRE>
public static final byte <B>MSG_CANCEL</B></PRE>
<DL>
<DD>Contains int UID
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.mpisws.p2p.filetransfer.FileTransferImpl.MSG_CANCEL">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="MSG_CANCEL_REQUEST"><!-- --></A><H3>
MSG_CANCEL_REQUEST</H3>
<PRE>
public static final byte <B>MSG_CANCEL_REQUEST</B></PRE>
<DL>
<DD>Contains int UID
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.mpisws.p2p.filetransfer.FileTransferImpl.MSG_CANCEL_REQUEST">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="fileAllocater"><!-- --></A><H3>
fileAllocater</H3>
<PRE>
protected <A HREF="../../../../org/mpisws/p2p/filetransfer/FileAllocationStrategy.html" title="interface in org.mpisws.p2p.filetransfer">FileAllocationStrategy</A> <B>fileAllocater</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="socket"><!-- --></A><H3>
socket</H3>
<PRE>
protected <A HREF="../../../../rice/p2p/commonapi/appsocket/AppSocket.html" title="interface in rice.p2p.commonapi.appsocket">AppSocket</A> <B>socket</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="callback"><!-- --></A><H3>
callback</H3>
<PRE>
protected <A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferCallback.html" title="interface in org.mpisws.p2p.filetransfer">FileTransferCallback</A> <B>callback</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="CHUNK_SIZE"><!-- --></A><H3>
CHUNK_SIZE</H3>
<PRE>
protected int <B>CHUNK_SIZE</B></PRE>
<DL>
<DD>Max size of a message, (the size that can't be preempted)
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="FILE_CACHE"><!-- --></A><H3>
FILE_CACHE</H3>
<PRE>
protected int <B>FILE_CACHE</B></PRE>
<DL>
<DD>Number of chunks to keep in memory per file.
If this is too big, takes more memory, if this is too small, we are always blocking on file I/O when there is available network I/O...
Is there a way to make this adaptive? Think about it...
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="selectorManager"><!-- --></A><H3>
selectorManager</H3>
<PRE>
protected <A HREF="../../../../rice/selector/SelectorManager.html" title="class in rice.selector">SelectorManager</A> <B>selectorManager</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="logger"><!-- --></A><H3>
logger</H3>
<PRE>
protected <A HREF="../../../../rice/environment/logging/Logger.html" title="class in rice.environment.logging">Logger</A> <B>logger</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="processor"><!-- --></A><H3>
processor</H3>
<PRE>
protected <A HREF="../../../../rice/environment/processing/Processor.html" title="interface in rice.environment.processing">Processor</A> <B>processor</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="environment"><!-- --></A><H3>
environment</H3>
<PRE>
protected <A HREF="../../../../rice/environment/Environment.html" title="class in rice.environment">Environment</A> <B>environment</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="MAX_PRIORITY"><!-- --></A><H3>
MAX_PRIORITY</H3>
<PRE>
public static final byte <B>MAX_PRIORITY</B></PRE>
<DL>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.mpisws.p2p.filetransfer.FileTransferImpl.MAX_PRIORITY">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="HIGH_PRIORITY"><!-- --></A><H3>
HIGH_PRIORITY</H3>
<PRE>
public static final byte <B>HIGH_PRIORITY</B></PRE>
<DL>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.mpisws.p2p.filetransfer.FileTransferImpl.HIGH_PRIORITY">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="MEDIUM_HIGH_PRIORITY"><!-- --></A><H3>
MEDIUM_HIGH_PRIORITY</H3>
<PRE>
public static final byte <B>MEDIUM_HIGH_PRIORITY</B></PRE>
<DL>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.mpisws.p2p.filetransfer.FileTransferImpl.MEDIUM_HIGH_PRIORITY">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="MEDIUM_PRIORITY"><!-- --></A><H3>
MEDIUM_PRIORITY</H3>
<PRE>
public static final byte <B>MEDIUM_PRIORITY</B></PRE>
<DL>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.mpisws.p2p.filetransfer.FileTransferImpl.MEDIUM_PRIORITY">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="MEDIUM_LOW_PRIORITY"><!-- --></A><H3>
MEDIUM_LOW_PRIORITY</H3>
<PRE>
public static final byte <B>MEDIUM_LOW_PRIORITY</B></PRE>
<DL>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.mpisws.p2p.filetransfer.FileTransferImpl.MEDIUM_LOW_PRIORITY">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="LOW_PRIORITY"><!-- --></A><H3>
LOW_PRIORITY</H3>
<PRE>
public static final byte <B>LOW_PRIORITY</B></PRE>
<DL>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.mpisws.p2p.filetransfer.FileTransferImpl.LOW_PRIORITY">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="LOWEST_PRIORITY"><!-- --></A><H3>
LOWEST_PRIORITY</H3>
<PRE>
public static final byte <B>LOWEST_PRIORITY</B></PRE>
<DL>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.mpisws.p2p.filetransfer.FileTransferImpl.LOWEST_PRIORITY">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="DEFAULT_PRIORITY"><!-- --></A><H3>
DEFAULT_PRIORITY</H3>
<PRE>
public static final byte <B>DEFAULT_PRIORITY</B></PRE>
<DL>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.mpisws.p2p.filetransfer.FileTransferImpl.DEFAULT_PRIORITY">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="CANCEL_PRIORITY"><!-- --></A><H3>
CANCEL_PRIORITY</H3>
<PRE>
public static final byte <B>CANCEL_PRIORITY</B></PRE>
<DL>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.mpisws.p2p.filetransfer.FileTransferImpl.CANCEL_PRIORITY">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="MAX_FILE_CHUNKS_IN_MEMORY"><!-- --></A><H3>
MAX_FILE_CHUNKS_IN_MEMORY</H3>
<PRE>
public static final int <B>MAX_FILE_CHUNKS_IN_MEMORY</B></PRE>
<DL>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.mpisws.p2p.filetransfer.FileTransferImpl.MAX_FILE_CHUNKS_IN_MEMORY">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="fileChunksInMemory"><!-- --></A><H3>
fileChunksInMemory</H3>
<PRE>
public int <B>fileChunksInMemory</B></PRE>
<DL>
<DD>Synchronized by only being mutated/checked on selector thread
can be reading when < MAX_PENDING_CHUNKS, allowed to be greater
<P>
<DL>
</DL>
</DL>
<!-- ========= 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="FileTransferImpl(rice.p2p.commonapi.appsocket.AppSocket, org.mpisws.p2p.filetransfer.FileTransferCallback, org.mpisws.p2p.filetransfer.FileAllocationStrategy, rice.environment.Environment, rice.environment.processing.Processor)"><!-- --></A><H3>
FileTransferImpl</H3>
<PRE>
public <B>FileTransferImpl</B>(<A HREF="../../../../rice/p2p/commonapi/appsocket/AppSocket.html" title="interface in rice.p2p.commonapi.appsocket">AppSocket</A>&nbsp;socket,
<A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferCallback.html" title="interface in org.mpisws.p2p.filetransfer">FileTransferCallback</A>&nbsp;callback,
<A HREF="../../../../org/mpisws/p2p/filetransfer/FileAllocationStrategy.html" title="interface in org.mpisws.p2p.filetransfer">FileAllocationStrategy</A>&nbsp;fileAllocater,
<A HREF="../../../../rice/environment/Environment.html" title="class in rice.environment">Environment</A>&nbsp;env,
<A HREF="../../../../rice/environment/processing/Processor.html" title="interface in rice.environment.processing">Processor</A>&nbsp;p)</PRE>
<DL>
</DL>
<HR>
<A NAME="FileTransferImpl(rice.p2p.commonapi.appsocket.AppSocket, org.mpisws.p2p.filetransfer.FileTransferCallback, org.mpisws.p2p.filetransfer.FileAllocationStrategy, rice.environment.Environment, rice.environment.processing.Processor, int, int)"><!-- --></A><H3>
FileTransferImpl</H3>
<PRE>
public <B>FileTransferImpl</B>(<A HREF="../../../../rice/p2p/commonapi/appsocket/AppSocket.html" title="interface in rice.p2p.commonapi.appsocket">AppSocket</A>&nbsp;socket,
<A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferCallback.html" title="interface in org.mpisws.p2p.filetransfer">FileTransferCallback</A>&nbsp;callback,
<A HREF="../../../../org/mpisws/p2p/filetransfer/FileAllocationStrategy.html" title="interface in org.mpisws.p2p.filetransfer">FileAllocationStrategy</A>&nbsp;fileAllocater,
<A HREF="../../../../rice/environment/Environment.html" title="class in rice.environment">Environment</A>&nbsp;env,
<A HREF="../../../../rice/environment/processing/Processor.html" title="interface in rice.environment.processing">Processor</A>&nbsp;p,
int&nbsp;chunkSize,
int&nbsp;numChunksToWriteToNetwork)</PRE>
<DL>
</DL>
<HR>
<A NAME="FileTransferImpl(rice.p2p.commonapi.appsocket.AppSocket, org.mpisws.p2p.filetransfer.FileTransferCallback, rice.environment.Environment)"><!-- --></A><H3>
FileTransferImpl</H3>
<PRE>
public <B>FileTransferImpl</B>(<A HREF="../../../../rice/p2p/commonapi/appsocket/AppSocket.html" title="interface in rice.p2p.commonapi.appsocket">AppSocket</A>&nbsp;socket,
<A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferCallback.html" title="interface in org.mpisws.p2p.filetransfer">FileTransferCallback</A>&nbsp;callback,
<A HREF="../../../../rice/environment/Environment.html" title="class in rice.environment">Environment</A>&nbsp;env)</PRE>
<DL>
</DL>
<HR>
<A NAME="FileTransferImpl(rice.p2p.commonapi.appsocket.AppSocket, org.mpisws.p2p.filetransfer.FileTransferCallback, org.mpisws.p2p.filetransfer.FileAllocationStrategy, rice.environment.Environment)"><!-- --></A><H3>
FileTransferImpl</H3>
<PRE>
public <B>FileTransferImpl</B>(<A HREF="../../../../rice/p2p/commonapi/appsocket/AppSocket.html" title="interface in rice.p2p.commonapi.appsocket">AppSocket</A>&nbsp;socket,
<A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferCallback.html" title="interface in org.mpisws.p2p.filetransfer">FileTransferCallback</A>&nbsp;callback,
<A HREF="../../../../org/mpisws/p2p/filetransfer/FileAllocationStrategy.html" title="interface in org.mpisws.p2p.filetransfer">FileAllocationStrategy</A>&nbsp;fileAllocater,
<A HREF="../../../../rice/environment/Environment.html" title="class in rice.environment">Environment</A>&nbsp;env)</PRE>
<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="socketClosed()"><!-- --></A><H3>
socketClosed</H3>
<PRE>
protected void <B>socketClosed</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="receiveException(rice.p2p.commonapi.appsocket.AppSocket, java.lang.Exception)"><!-- --></A><H3>
receiveException</H3>
<PRE>
public void <B>receiveException</B>(<A HREF="../../../../rice/p2p/commonapi/appsocket/AppSocket.html" title="interface in rice.p2p.commonapi.appsocket">AppSocket</A>&nbsp;socket,
java.lang.Exception&nbsp;e)</PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../rice/p2p/commonapi/appsocket/AppSocketReceiver.html#receiveException(rice.p2p.commonapi.appsocket.AppSocket, java.lang.Exception)">AppSocketReceiver</A></CODE></B></DD>
<DD>Called when there is an error
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../rice/p2p/commonapi/appsocket/AppSocketReceiver.html#receiveException(rice.p2p.commonapi.appsocket.AppSocket, java.lang.Exception)">receiveException</A></CODE> in interface <CODE><A HREF="../../../../rice/p2p/commonapi/appsocket/AppSocketReceiver.html" title="interface in rice.p2p.commonapi.appsocket">AppSocketReceiver</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="purge()"><!-- --></A><H3>
purge</H3>
<PRE>
protected void <B>purge</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="scheduleToWriteIfNeeded()"><!-- --></A><H3>
scheduleToWriteIfNeeded</H3>
<PRE>
protected void <B>scheduleToWriteIfNeeded</B>()</PRE>
<DL>
<DD>Must be called on selectorManager.
A) finds a writingSocket if possible
opens one if needed
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="complete(org.mpisws.p2p.filetransfer.FileTransferImpl.MessageWrapper)"><!-- --></A><H3>
complete</H3>
<PRE>
protected boolean <B>complete</B>(org.mpisws.p2p.filetransfer.FileTransferImpl.MessageWrapper&nbsp;wrapper)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="addListener(org.mpisws.p2p.filetransfer.FileTransferListener)"><!-- --></A><H3>
addListener</H3>
<PRE>
public void <B>addListener</B>(<A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferListener.html" title="interface in org.mpisws.p2p.filetransfer">FileTransferListener</A>&nbsp;listener)</PRE>
<DL>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransfer.html#addListener(org.mpisws.p2p.filetransfer.FileTransferListener)">addListener</A></CODE> in interface <CODE><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransfer.html" title="interface in org.mpisws.p2p.filetransfer">FileTransfer</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="removeListener(org.mpisws.p2p.filetransfer.FileTransferListener)"><!-- --></A><H3>
removeListener</H3>
<PRE>
public void <B>removeListener</B>(<A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferListener.html" title="interface in org.mpisws.p2p.filetransfer">FileTransferListener</A>&nbsp;listener)</PRE>
<DL>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransfer.html#removeListener(org.mpisws.p2p.filetransfer.FileTransferListener)">removeListener</A></CODE> in interface <CODE><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransfer.html" title="interface in org.mpisws.p2p.filetransfer">FileTransfer</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getListeners()"><!-- --></A><H3>
getListeners</H3>
<PRE>
public java.lang.Iterable&lt;<A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferListener.html" title="interface in org.mpisws.p2p.filetransfer">FileTransferListener</A>&gt; <B>getListeners</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="notifyListenersSendMsgProgress(org.mpisws.p2p.filetransfer.BBReceipt, int, int)"><!-- --></A><H3>
notifyListenersSendMsgProgress</H3>
<PRE>
protected void <B>notifyListenersSendMsgProgress</B>(<A HREF="../../../../org/mpisws/p2p/filetransfer/BBReceipt.html" title="interface in org.mpisws.p2p.filetransfer">BBReceipt</A>&nbsp;receipt,
int&nbsp;bytesSent,
int&nbsp;bytesTotal)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="notifyListenersReceiveMsgProgress(org.mpisws.p2p.filetransfer.BBReceipt, int, int)"><!-- --></A><H3>
notifyListenersReceiveMsgProgress</H3>
<PRE>
protected void <B>notifyListenersReceiveMsgProgress</B>(<A HREF="../../../../org/mpisws/p2p/filetransfer/BBReceipt.html" title="interface in org.mpisws.p2p.filetransfer">BBReceipt</A>&nbsp;receipt,
int&nbsp;bytesReceived,
int&nbsp;bytesTotal)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="notifyListenersSendFileProgress(org.mpisws.p2p.filetransfer.FileReceipt, long, long)"><!-- --></A><H3>
notifyListenersSendFileProgress</H3>
<PRE>
protected void <B>notifyListenersSendFileProgress</B>(<A HREF="../../../../org/mpisws/p2p/filetransfer/FileReceipt.html" title="interface in org.mpisws.p2p.filetransfer">FileReceipt</A>&nbsp;receipt,
long&nbsp;bytesSent,
long&nbsp;bytesTotal)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="notifyListenersReceiveFileProgress(org.mpisws.p2p.filetransfer.FileReceipt, long, long)"><!-- --></A><H3>
notifyListenersReceiveFileProgress</H3>
<PRE>
protected void <B>notifyListenersReceiveFileProgress</B>(<A HREF="../../../../org/mpisws/p2p/filetransfer/FileReceipt.html" title="interface in org.mpisws.p2p.filetransfer">FileReceipt</A>&nbsp;receipt,
long&nbsp;bytesReceived,
long&nbsp;bytesTotal)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="notifyListenersSenderCancelled(org.mpisws.p2p.filetransfer.FileTransferImpl.DataReader)"><!-- --></A><H3>
notifyListenersSenderCancelled</H3>
<PRE>
protected void <B>notifyListenersSenderCancelled</B>(org.mpisws.p2p.filetransfer.FileTransferImpl.DataReader&nbsp;receipt)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="notifyListenersReceiverCancelled(org.mpisws.p2p.filetransfer.Receipt)"><!-- --></A><H3>
notifyListenersReceiverCancelled</H3>
<PRE>
protected void <B>notifyListenersReceiverCancelled</B>(<A HREF="../../../../org/mpisws/p2p/filetransfer/Receipt.html" title="interface in org.mpisws.p2p.filetransfer">Receipt</A>&nbsp;receipt)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="notifyListenersTransferFailed(org.mpisws.p2p.filetransfer.Receipt, boolean)"><!-- --></A><H3>
notifyListenersTransferFailed</H3>
<PRE>
protected void <B>notifyListenersTransferFailed</B>(<A HREF="../../../../org/mpisws/p2p/filetransfer/Receipt.html" title="interface in org.mpisws.p2p.filetransfer">Receipt</A>&nbsp;receipt,
boolean&nbsp;incoming)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="sendFile(java.io.File, java.nio.ByteBuffer, byte, rice.Continuation)"><!-- --></A><H3>
sendFile</H3>
<PRE>
public <A HREF="../../../../org/mpisws/p2p/filetransfer/FileReceipt.html" title="interface in org.mpisws.p2p.filetransfer">FileReceipt</A> <B>sendFile</B>(java.io.File&nbsp;f,
java.nio.ByteBuffer&nbsp;metadata,
byte&nbsp;priority,
<A HREF="../../../../rice/Continuation.html" title="interface in rice">Continuation</A>&lt;<A HREF="../../../../org/mpisws/p2p/filetransfer/FileReceipt.html" title="interface in org.mpisws.p2p.filetransfer">FileReceipt</A>,java.lang.Exception&gt;&nbsp;c)
throws java.io.IOException</PRE>
<DL>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransfer.html#sendFile(java.io.File, java.nio.ByteBuffer, byte, rice.Continuation)">sendFile</A></CODE> in interface <CODE><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransfer.html" title="interface in org.mpisws.p2p.filetransfer">FileTransfer</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="sendFile(java.io.File, java.nio.ByteBuffer, byte, long, long, rice.Continuation)"><!-- --></A><H3>
sendFile</H3>
<PRE>
public <A HREF="../../../../org/mpisws/p2p/filetransfer/FileReceipt.html" title="interface in org.mpisws.p2p.filetransfer">FileReceipt</A> <B>sendFile</B>(java.io.File&nbsp;f,
java.nio.ByteBuffer&nbsp;metadataBB,
byte&nbsp;priority,
long&nbsp;offset,
long&nbsp;length,
<A HREF="../../../../rice/Continuation.html" title="interface in rice">Continuation</A>&lt;<A HREF="../../../../org/mpisws/p2p/filetransfer/FileReceipt.html" title="interface in org.mpisws.p2p.filetransfer">FileReceipt</A>,java.lang.Exception&gt;&nbsp;c)
throws java.io.IOException</PRE>
<DL>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransfer.html#sendFile(java.io.File, java.nio.ByteBuffer, byte, long, long, rice.Continuation)">sendFile</A></CODE> in interface <CODE><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransfer.html" title="interface in org.mpisws.p2p.filetransfer">FileTransfer</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>f</CODE> - the file to send<DD><CODE>metadataBB</CODE> - this data will be delivered to the FileAllocationStrategy and the FileTransferCallback, it can
contain whatever the application needs to name the file, often a filename is sufficient.<DD><CODE>priority</CODE> - the priority of sending<DD><CODE>offset</CODE> - where to start in the file<DD><CODE>length</CODE> - how many bytes to send (must be <= fileLength-offset)<DD><CODE>c</CODE> - who to notify when it is done
<DT><B>Returns:</B><DD>
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="sendMsg(java.nio.ByteBuffer, byte, rice.Continuation)"><!-- --></A><H3>
sendMsg</H3>
<PRE>
public <A HREF="../../../../org/mpisws/p2p/filetransfer/BBReceipt.html" title="interface in org.mpisws.p2p.filetransfer">BBReceipt</A> <B>sendMsg</B>(java.nio.ByteBuffer&nbsp;bb,
byte&nbsp;priority,
<A HREF="../../../../rice/Continuation.html" title="interface in rice">Continuation</A>&lt;<A HREF="../../../../org/mpisws/p2p/filetransfer/BBReceipt.html" title="interface in org.mpisws.p2p.filetransfer">BBReceipt</A>,java.lang.Exception&gt;&nbsp;c)</PRE>
<DL>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransfer.html#sendMsg(java.nio.ByteBuffer, byte, rice.Continuation)">sendMsg</A></CODE> in interface <CODE><A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransfer.html" title="interface in org.mpisws.p2p.filetransfer">FileTransfer</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getUid()"><!-- --></A><H3>
getUid</H3>
<PRE>
protected int <B>getUid</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="receiveSelectResult(rice.p2p.commonapi.appsocket.AppSocket, boolean, boolean)"><!-- --></A><H3>
receiveSelectResult</H3>
<PRE>
public void <B>receiveSelectResult</B>(<A HREF="../../../../rice/p2p/commonapi/appsocket/AppSocket.html" title="interface in rice.p2p.commonapi.appsocket">AppSocket</A>&nbsp;socket,
boolean&nbsp;canRead,
boolean&nbsp;canWrite)</PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../rice/p2p/commonapi/appsocket/AppSocketReceiver.html#receiveSelectResult(rice.p2p.commonapi.appsocket.AppSocket, boolean, boolean)">AppSocketReceiver</A></CODE></B></DD>
<DD>Called when a socket is available for read/write
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../rice/p2p/commonapi/appsocket/AppSocketReceiver.html#receiveSelectResult(rice.p2p.commonapi.appsocket.AppSocket, boolean, boolean)">receiveSelectResult</A></CODE> in interface <CODE><A HREF="../../../../rice/p2p/commonapi/appsocket/AppSocketReceiver.html" title="interface in rice.p2p.commonapi.appsocket">AppSocketReceiver</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="incrementFileChunksInMemory()"><!-- --></A><H3>
incrementFileChunksInMemory</H3>
<PRE>
protected void <B>incrementFileChunksInMemory</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="decrementFileChunksInMemory()"><!-- --></A><H3>
decrementFileChunksInMemory</H3>
<PRE>
protected void <B>decrementFileChunksInMemory</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="registerToReadIfPossible()"><!-- --></A><H3>
registerToReadIfPossible</H3>
<PRE>
public void <B>registerToReadIfPossible</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="receiverCancelled(int)"><!-- --></A><H3>
receiverCancelled</H3>
<PRE>
protected void <B>receiverCancelled</B>(int&nbsp;uid)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="senderCancelled(int)"><!-- --></A><H3>
senderCancelled</H3>
<PRE>
protected void <B>senderCancelled</B>(int&nbsp;uid)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="addIncomingMessage(int, int)"><!-- --></A><H3>
addIncomingMessage</H3>
<PRE>
public void <B>addIncomingMessage</B>(int&nbsp;uid,
int&nbsp;size)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="addIncomingFile(int, byte[], long, long)"><!-- --></A><H3>
addIncomingFile</H3>
<PRE>
public void <B>addIncomingFile</B>(int&nbsp;uid,
byte[]&nbsp;metadata,
long&nbsp;offset,
long&nbsp;length)
throws java.io.IOException</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="receiveSocket(rice.p2p.commonapi.appsocket.AppSocket)"><!-- --></A><H3>
receiveSocket</H3>
<PRE>
public void <B>receiveSocket</B>(<A HREF="../../../../rice/p2p/commonapi/appsocket/AppSocket.html" title="interface in rice.p2p.commonapi.appsocket">AppSocket</A>&nbsp;socket)</PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../rice/p2p/commonapi/appsocket/AppSocketReceiver.html#receiveSocket(rice.p2p.commonapi.appsocket.AppSocket)">AppSocketReceiver</A></CODE></B></DD>
<DD>Called when we have a new socket (due to a call to connect or accept)
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../rice/p2p/commonapi/appsocket/AppSocketReceiver.html#receiveSocket(rice.p2p.commonapi.appsocket.AppSocket)">receiveSocket</A></CODE> in interface <CODE><A HREF="../../../../rice/p2p/commonapi/appsocket/AppSocketReceiver.html" title="interface in rice.p2p.commonapi.appsocket">AppSocketReceiver</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="requestCancel(int)"><!-- --></A><H3>
requestCancel</H3>
<PRE>
protected boolean <B>requestCancel</B>(int&nbsp;uid)</PRE>
<DL>
<DD>Only call this on the receiver side, b/c uid is simplex
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>uid</CODE> -
<DT><B>Returns:</B><DD>if we can guarantee the request was cancelled</DL>
</DD>
</DL>
<HR>
<A NAME="sendCancel(int)"><!-- --></A><H3>
sendCancel</H3>
<PRE>
protected boolean <B>sendCancel</B>(int&nbsp;uid)</PRE>
<DL>
<DD>Only call this on the sender side, b/c uid is simplex
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>uid</CODE> -
<DT><B>Returns:</B><DD></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="class-use/FileTransferImpl.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&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>
Rice Pastry API</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferCallback.html" title="interface in org.mpisws.p2p.filetransfer"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../org/mpisws/p2p/filetransfer/FileTransferListener.html" title="interface in org.mpisws.p2p.filetransfer"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?org/mpisws/p2p/filetransfer/FileTransferImpl.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="FileTransferImpl.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;<A HREF="#constructor_summary">CONSTR</A>&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;<A HREF="#constructor_detail">CONSTR</A>&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 &#169; 2001-2005 - Rice Pastry.</i>
</BODY>
</HTML>