openr66.protocol.test
Class TestProgressBarTransfer

java.lang.Object
  extended by openr66.client.AbstractTransfer
      extended by openr66.client.ProgressBarTransfer
          extended by openr66.protocol.test.TestProgressBarTransfer
All Implemented Interfaces:
Runnable

public class TestProgressBarTransfer
extends ProgressBarTransfer

Author:
Frederic Bregier

Field Summary
 
Fields inherited from class openr66.client.ProgressBarTransfer
filesize, INTERVALCALLBACK, networkTransaction
 
Fields inherited from class openr66.client.AbstractTransfer
block, blocksize, dateFormat, fileinfo, fileInfo, filename, future, id, idt, ismd5, isMD5, localFilename, logger, nolog, remoteHost, rhost, rule, rulename, startTime, ttimestart
 
Constructor Summary
TestProgressBarTransfer(R66Future future, String remoteHost, String filename, String rulename, String fileinfo, boolean isMD5, int blocksize, long id, NetworkTransaction networkTransaction, long callbackdelay)
           
 
Method Summary
 void callBack(int currentBlock, int blocksize)
          This function will be called every 100ms (or other fixed value in INTERVALCALLBACK).
 void lastCallBack(boolean success, int currentBlock, int blocksize)
          This function will be called only once when the transfer is over
static void main(String[] args)
           
 
Methods inherited from class openr66.client.ProgressBarTransfer
run
 
Methods inherited from class openr66.client.AbstractTransfer
getParams, initRequest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestProgressBarTransfer

public TestProgressBarTransfer(R66Future future,
                               String remoteHost,
                               String filename,
                               String rulename,
                               String fileinfo,
                               boolean isMD5,
                               int blocksize,
                               long id,
                               NetworkTransaction networkTransaction,
                               long callbackdelay)
Parameters:
future -
remoteHost -
filename -
rulename -
fileinfo -
isMD5 -
blocksize -
id -
networkTransaction -
callbackdelay -
Method Detail

callBack

public void callBack(int currentBlock,
                     int blocksize)
Description copied from class: ProgressBarTransfer
This function will be called every 100ms (or other fixed value in INTERVALCALLBACK). Note that final rank is unknown.

Specified by:
callBack in class ProgressBarTransfer
Parameters:
currentBlock - the current block rank (from 0 to n-1)
blocksize - blocksize of 1 block

lastCallBack

public void lastCallBack(boolean success,
                         int currentBlock,
                         int blocksize)
Description copied from class: ProgressBarTransfer
This function will be called only once when the transfer is over

Specified by:
lastCallBack in class ProgressBarTransfer
Parameters:
success - True if the transfer is successful

main

public static void main(String[] args)


Copyright © 2009-2012 Frederic Bregier. All Rights Reserved.