s243a

FECallback.java (freenet.client)

Oct 22nd, 2014
326
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.42 KB | None | 0 0
  1. // s243a pearltree node: http://www.pearltrees.com/s243a/feccallback-freenet-client/id12827801
  2. /* This code is part of Freenet. It is distributed under the GNU General
  3.  * Public License, version 2 (or at your option any later version). See
  4.  * http://www.gnu.org/ for further details of the GPL. */
  5. package freenet.client;
  6.  
  7. import com.db4o.ObjectContainer;
  8.  
  9. import freenet.client.async.ClientContext;
  10. import freenet.support.api.Bucket;
  11.  
  12. /**
  13.  * An interface wich has to be implemented by FECJob submitters
  14.  *
  15.  * @author Florent Daignière <[email protected]>
  16.  *
  17.  * WARNING: the callback is expected to release the thread !
  18.  */
  19. public interface FECCallback {
  20.  
  21.     /**
  22.      * The implementor MUST copy the data manually from the arrays on the FECJob, because
  23.      * db4o persists arrays as inline values, so WE CANNOT UPDATE THE ARRAY!!
  24.      * @param container
  25.      * @param context
  26.      * @param job
  27.      */
  28.     public void onEncodedSegment(ObjectContainer container, ClientContext context, FECJob job, Bucket[] dataBuckets, Bucket[] checkBuckets, SplitfileBlock[] dataBlocks, SplitfileBlock[] checkBlocks);
  29.  
  30.     public void onDecodedSegment(ObjectContainer container, ClientContext context, FECJob job, Bucket[] dataBuckets, Bucket[] checkBuckets, SplitfileBlock[] dataBlocks, SplitfileBlock[] checkBlocks);
  31.  
  32.     /** Something broke. */
  33.     public void onFailed(Throwable t, ObjectContainer container, ClientContext context);
  34. }
Add Comment
Please, Sign In to add comment