|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnl.uva.vlet.vfs.VFSTransfer
public class VFSTransfer
VFSTransfer class. Keeps record of ongoing transfers. VRS classes should update this transfer information.
The minimum use is:
setStart()
// dostuff...
setDone()
Constructor Summary | |
---|---|
protected |
VFSTransfer(java.lang.String resourceType,
VRL source,
VRL destination,
boolean isMove)
|
Method Summary | |
---|---|
void |
addLogText(java.lang.String txt)
Add INFORMATIVE (for end user) text without newline to logtext |
void |
addSource(VRL vrl)
|
void |
addSources(VRL[] vrls)
Add extra source VRL to the source list, when recursive copying a directory First source in the sources vector is the starting (root) source as specified at construction time. |
VAttribute[] |
getAttributes()
|
long |
getCurrentTransferred()
|
long |
getCurrentTransferredLastUpdateTime()
|
long |
getCurrentTransferSize()
|
long |
getCurrentTransferStartTime()
|
VRL |
getDestination()
|
long |
getETA()
Returns ETA in millis. |
VlException |
getException()
|
int |
getId()
|
java.lang.String |
getLogText()
|
boolean |
getMustStop()
|
int |
getNrOfSources()
Get nr of sources currently transferred/being transferred. |
float |
getProgress()
|
VFSNode |
getResultNode()
|
VRL |
getRootDestination()
|
VRL |
getSource()
|
java.lang.String |
getSpeed()
|
long |
getStartTime()
|
java.lang.String |
getStatus()
|
long |
getStopTime()
|
long |
getTime()
|
int |
getTotalNrOfSources()
|
long |
getTotalTransferred()
|
long |
getTotalTransferredLastUpdateTime()
|
long |
getTotalTransferSize()
|
static VAttribute[][] |
getTransferAttributes()
Returns transfers as attribute matrix |
boolean |
hasError()
|
boolean |
isDone()
|
boolean |
isMove()
|
protected void |
markStarted()
store system time when the transfer started |
protected void |
markStopped()
stop system time when the transfer stopped. |
static VFSTransfer |
newTransfer(java.lang.String type,
VRL source,
VRL dest,
boolean isMove)
|
void |
printReport(java.io.PrintStream output)
|
void |
setCurrentTransferred(long size)
Set nr bytes already transferred in current transfer |
void |
setCurrentTransferSize(long size)
Set transfer size of current transfer. |
void |
setDone()
Set Transfer status to done. |
void |
setException(VlException e)
|
void |
setMustStop()
Signal that this transfer must Stop! |
void |
setResultNode(VFSNode node)
|
void |
setStart()
|
void |
setTotalSources(int nr)
Set the total nr of sources to be tranferred. |
void |
setTotalTransferred(long size)
|
void |
setTotalTransferSize(long size)
Set transfer size of current transfer |
java.lang.String |
toString()
|
void |
waitForCompletion()
This method will block until the setDone() method is called |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected VFSTransfer(java.lang.String resourceType, VRL source, VRL destination, boolean isMove)
Method Detail |
---|
public VRL getDestination()
public VlException getException()
public long getTime()
public void setException(VlException e)
exception
- The exception to set.public int getId()
public boolean isDone()
public void setDone()
public boolean isMove()
public java.lang.String getStatus()
public boolean hasError()
public java.lang.String getSpeed()
public float getProgress()
public VRL getSource()
public VRL getRootDestination()
public int getNrOfSources()
For a bulk upload method, this returns only 1 as the whole directory is seen as only 1 source. A recursive directory copy will return actual nr of files+ directories which currently are being transferred. This might be less the the total nr of sources as that nr might increase during the recursive copy.
A directory with one file will return '2' for the number of sources.
public int getTotalNrOfSources()
public void setTotalSources(int nr)
public java.lang.String toString()
toString
in class java.lang.Object
public static VFSTransfer newTransfer(java.lang.String type, VRL source, VRL dest, boolean isMove)
public static VAttribute[][] getTransferAttributes()
public VAttribute[] getAttributes()
protected void markStarted()
protected void markStopped()
public void printReport(java.io.PrintStream output)
public void setCurrentTransferSize(long size)
public void setTotalTransferSize(long size)
public void setCurrentTransferred(long size)
public void setTotalTransferred(long size)
public void setMustStop()
public void addLogText(java.lang.String txt)
public java.lang.String getLogText()
public void addSources(VRL[] vrls)
vrls
- public void addSource(VRL vrl)
public boolean getMustStop()
public void waitForCompletion() throws VlInterruptedException
VlInterruptedException
public void setResultNode(VFSNode node)
public VFSNode getResultNode()
public void setStart()
public long getTotalTransferred()
public long getTotalTransferSize()
public long getCurrentTransferred()
public long getCurrentTransferSize()
public long getStartTime()
public long getStopTime()
public long getCurrentTransferredLastUpdateTime()
public long getTotalTransferredLastUpdateTime()
public long getCurrentTransferStartTime()
public long getETA()
-1 = no statistics 0 = done >0 = estimated finished time in mill seconds
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |