public class FileTransferMonitorAgent
extends java.lang.Object
Constructor and Description |
---|
FileTransferMonitorAgent(FileTransferMonitor fm,
org.apache.commons.vfs2.FileObject dest) |
FileTransferMonitorAgent(FileTransferMonitor fm,
org.apache.commons.vfs2.FileObject dest,
org.apache.commons.vfs2.FileObject source,
long sourceSize,
java.lang.String displayName)
Main constructor
|
FileTransferMonitorAgent(FileTransferMonitor fm,
org.apache.commons.vfs2.FileObject dest,
org.apache.commons.vfs2.FileObject source,
java.lang.String displayName) |
FileTransferMonitorAgent(FileTransferMonitor fm,
org.apache.commons.vfs2.FileObject dest,
long sourceSize) |
FileTransferMonitorAgent(FileTransferMonitor fm,
org.apache.commons.vfs2.FileObject dest,
long sourceSize,
java.lang.String displayName) |
Modifier and Type | Method and Description |
---|---|
void |
check()
Refreshes the destination file, checking if the file has changed and fires
an event if either the size or modification time is different.
|
void |
fireComplete()
Fires a transfer complete event
|
void |
fireStart()
Fires a "start" event for this transfer to all listeners in the associated
FileTransferMonitor.
|
void |
fireUpdate()
Fires on update event
|
org.apache.commons.vfs2.FileObject |
getDestinationFile() |
long |
getLastTimestamp() |
FileTransferMonitor |
getMonitor() |
org.apache.commons.vfs2.FileObject |
getSourceFile() |
long |
getSourceSize() |
long |
getTransferedSize() |
public FileTransferMonitorAgent(FileTransferMonitor fm, org.apache.commons.vfs2.FileObject dest, org.apache.commons.vfs2.FileObject source, long sourceSize, java.lang.String displayName)
fm
- associated FileTransferMonitordest
- transfer destinationsource
- transfer sourcesourceSize
- total size of transfer (size of source). Provided for cases when source size
cannot be determined due to the file system typedisplayName
- the file name associated with the transfer (may be different from dest.fileName)public FileTransferMonitorAgent(FileTransferMonitor fm, org.apache.commons.vfs2.FileObject dest, org.apache.commons.vfs2.FileObject source, java.lang.String displayName)
fm
- FileTransferMonitor associated with this agentdest
- Transfer destinationsource
- Transfer sourcedisplayName
- Name associated with file transferpublic FileTransferMonitorAgent(FileTransferMonitor fm, org.apache.commons.vfs2.FileObject dest, long sourceSize, java.lang.String displayName)
fm
- Associated FileTransferMonitordest
- transfer destinationsourceSize
- transfer sizedisplayName
- name associated with transferpublic FileTransferMonitorAgent(FileTransferMonitor fm, org.apache.commons.vfs2.FileObject dest, long sourceSize)
fm
- Associated FileTransferMonitordest
- transfer destinationsourceSize
- transfer sizepublic FileTransferMonitorAgent(FileTransferMonitor fm, org.apache.commons.vfs2.FileObject dest)
fm
- Associated FileTransferMonitordest
- transfer destinationpublic void check()
public void fireStart()
public void fireUpdate()
public void fireComplete()
public org.apache.commons.vfs2.FileObject getDestinationFile()
public org.apache.commons.vfs2.FileObject getSourceFile()
public FileTransferMonitor getMonitor()
public long getLastTimestamp()
public long getTransferedSize()
public long getSourceSize()