org.eclipse.ecf.filetransfer
Interface IIncomingFileTransfer

All Superinterfaces:
org.eclipse.core.runtime.IAdaptable, IFileTransfer, IIdentifiable
All Known Implementing Classes:
AbstractRetrieveFileTransfer, HttpClientRetrieveFileTransfer, UrlConnectionRetrieveFileTransfer

public interface IIncomingFileTransfer
extends IFileTransfer

Incoming file transfer request. Instance implementing this interface are provided via calling the IIncomingFileTransferReceiveStartEvent.receive(java.io.File) method.


Method Summary
 long getBytesReceived()
          Get number of bytes received so far.
 IFileRangeSpecification getFileRangeSpecification()
          Get file range specification for this incoming file transfer instance.
 IFileTransferListener getListener()
          Get listener assigned to this incoming file transfer.
 java.lang.String getRemoteFileName()
          Obtains the name of the remote file if possible.
 java.util.Date getRemoteLastModified()
          Obtains the timestamp that reflects the time when the remote file was last modified if possible.
 
Methods inherited from interface org.eclipse.ecf.filetransfer.IFileTransfer
cancel, getException, getFileLength, getPercentComplete, isDone
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 
Methods inherited from interface org.eclipse.ecf.core.identity.IIdentifiable
getID
 

Method Detail

getBytesReceived

long getBytesReceived()
Get number of bytes received so far. If provider does not support reporting the number of bytes received, will return -1.

Returns:
long number of bytes received. Returns -1 if provider does not support reporting of number of bytes received during transfer

getListener

IFileTransferListener getListener()
Get listener assigned to this incoming file transfer. May be null if no listener has been provided.

Returns:
listener the IFileTransferListener provided for this incoming file transfer.

getFileRangeSpecification

IFileRangeSpecification getFileRangeSpecification()
Get file range specification for this incoming file transfer instance. Will return null if the retrieval is of the entire file.

Returns:
file range specification for this incoming file transfer instance. Returns null if the retrieval is of the entire file.

getRemoteFileName

java.lang.String getRemoteFileName()
Obtains the name of the remote file if possible. The name will typically but not necessarily be the same as the leaf part of the path to the remote file.

Returns:
The name of the remote file or null if no such name can be determined.
Since:
2.0

getRemoteLastModified

java.util.Date getRemoteLastModified()
Obtains the timestamp that reflects the time when the remote file was last modified if possible.

Returns:
The time the remote file was last modified or null if that information was not available.
Since:
2.0