org.globus.cog.gridface.impl.gftpanel
Class Transfer

java.lang.Object
  extended byjava.util.Observable
      extended byorg.globus.cog.gridface.impl.gftpanel.Transfer
All Implemented Interfaces:
MarkerListener, Runnable

public class Transfer
extends Observable
implements Runnable, MarkerListener


Field Summary
protected  boolean canceled
           
 GridFTPHost destination
           
protected  GridFTPClient destinationHandle
           
 GridFTPPanel displayPanel
           
protected  boolean done
           
protected  String errorDescription
           
protected  Exception exception
           
protected  int failures
           
protected  float progress
           
protected  float rate
           
protected  int repeat
           
protected  int repetition
           
protected  int sleep
           
 GridFTPHost source
           
protected  GridFTPClient sourceHandle
           
protected  boolean stats
           
protected  String status
           
protected  int successes
           
protected  Thread thread
           
protected  String time
           
protected  Timer timer
           
protected  long totalSize
           
protected  long transferSeconds
           
protected  long transferSize
           
protected  long wallClockSeconds
           
 
Constructor Summary
Transfer(GridFTPPanel panel, GridFTPHost source, GridFTPHost destination)
           
Transfer(GridFTPPanel panel, GridFTPHost source, GridFTPHost destination, boolean stats)
           
Transfer(GridFTPPanel displayPanel, GridFTPHost source, GridFTPHost destination, int repeat, int sleep, boolean stats)
           
 
Method Summary
protected  void authenticateDestination()
           
protected  void authenticateSource()
           
 void cancel()
           
 void done()
           
 void doRepetition()
           
protected  void error(String description, Exception exception)
           
static String formatFloat(float f)
           
 String getDisplayFilesize()
           
 String getDisplayRate()
           
 String getDisplayTime()
           
 long getFilesize()
           
protected  void getFileSize()
           
 float getProgress()
           
 float getRate()
           
 boolean getSendAnonymousStats()
           
 String getStatus()
           
 boolean isCanceled()
           
 boolean isDone()
           
 void markerArrived(Marker m)
           
protected  void readProxy()
           
protected  void resetState()
           
 void run()
           
 void runTransfer()
           
protected  void sendAnonymousStats()
           
 void SetDisplayPanel(GridFTPPanel aPanel)
           
protected  void setProgress(float progress)
           
protected  void setRate(float rate)
           
 void setSendAnonymousStats(boolean stats)
           
protected  void setStatus(String status)
           
 String toString()
           
protected  void transferFile()
           
protected  void updateTime()
           
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

destination

public GridFTPHost destination

source

public GridFTPHost source

displayPanel

public GridFTPPanel displayPanel

exception

protected Exception exception

destinationHandle

protected GridFTPClient destinationHandle

sourceHandle

protected GridFTPClient sourceHandle

errorDescription

protected String errorDescription

status

protected String status

time

protected String time

thread

protected Thread thread

timer

protected Timer timer

canceled

protected boolean canceled

done

protected boolean done

stats

protected boolean stats

failures

protected int failures

repeat

protected int repeat

repetition

protected int repetition

sleep

protected int sleep

successes

protected int successes

progress

protected float progress

rate

protected float rate

totalSize

protected long totalSize

transferSeconds

protected long transferSeconds

transferSize

protected long transferSize

wallClockSeconds

protected long wallClockSeconds
Constructor Detail

Transfer

public Transfer(GridFTPPanel displayPanel,
                GridFTPHost source,
                GridFTPHost destination,
                int repeat,
                int sleep,
                boolean stats)

Transfer

public Transfer(GridFTPPanel panel,
                GridFTPHost source,
                GridFTPHost destination,
                boolean stats)

Transfer

public Transfer(GridFTPPanel panel,
                GridFTPHost source,
                GridFTPHost destination)
Method Detail

SetDisplayPanel

public void SetDisplayPanel(GridFTPPanel aPanel)

formatFloat

public static String formatFloat(float f)

getDisplayFilesize

public String getDisplayFilesize()

getDisplayRate

public String getDisplayRate()

getDisplayTime

public String getDisplayTime()

doRepetition

public void doRepetition()

cancel

public void cancel()

isCanceled

public boolean isCanceled()

done

public void done()

resetState

protected void resetState()

isDone

public boolean isDone()

getFilesize

public long getFilesize()

getProgress

public float getProgress()

getRate

public float getRate()

setSendAnonymousStats

public void setSendAnonymousStats(boolean stats)

getSendAnonymousStats

public boolean getSendAnonymousStats()

getStatus

public String getStatus()

setProgress

protected void setProgress(float progress)

setRate

protected void setRate(float rate)

setStatus

protected void setStatus(String status)

error

protected void error(String description,
                     Exception exception)

readProxy

protected void readProxy()

authenticateSource

protected void authenticateSource()

authenticateDestination

protected void authenticateDestination()

getFileSize

protected void getFileSize()

transferFile

protected void transferFile()

run

public void run()
Specified by:
run in interface Runnable

runTransfer

public void runTransfer()

sendAnonymousStats

protected void sendAnonymousStats()

updateTime

protected void updateTime()

markerArrived

public void markerArrived(Marker m)
Specified by:
markerArrived in interface MarkerListener

toString

public String toString()