|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.emf.emfstore.internal.client.model.filetransfer.FileDownloadStatus
public final class FileDownloadStatus
An object of this class is returned from any workspace method that starts a file transfer. It provides information about this file transfer and allows to add Progressmonitors and Observers
Nested Class Summary | |
---|---|
static class |
FileDownloadStatus.Status
Return value of the getStatus method. |
Field Summary | |
---|---|
static int |
NOT_AVAILABLE
Constant signaling "not available". |
Method Summary | |
---|---|
void |
addDefaultFailObserver()
Adds a default observer that is notified when the transfer fails. |
void |
addTransferFailedObserver(Observer o)
Adds an observer which is notified if the transfer fails due to an exception. |
void |
addTransferFinishedObserver(Observer o)
Adds an observer that is notified once the transfer is finished. |
Exception |
getException()
Returns the exception that caused the download to fail, if the status == FAILED. |
FileIdentifier |
getFileIdentifier()
Returns the identifier of the file to be downloaded. |
FileTransferStatistics |
getStatistics()
Gets the statistics object for this file transfer, which provides useful information, especially while the transfer is active. |
FileDownloadStatus.Status |
getStatus()
This is the ultimate method for checking in which "stage" a file transfer currently is. |
File |
getTransferredFile()
Returns the transferred file. |
File |
getTransferredFile(boolean block)
Similar to getTransferredFile() , but this method blocks the
client thread. |
ProjectSpace |
getTransferringProjectSpace()
Returns the project space which started this file transfer. |
boolean |
isNotOnServer()
Whether the file to be downloaded is on server. |
boolean |
isTransferFinished()
Returns true if the transfer is finished. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int NOT_AVAILABLE
Method Detail |
---|
public FileIdentifier getFileIdentifier()
public FileDownloadStatus.Status getStatus()
public void addTransferFinishedObserver(Observer o)
o
- an observer to be notified when the transfer is finishedpublic void addTransferFailedObserver(Observer o)
o
- an observer that is notified if the transfer failspublic void addDefaultFailObserver()
public boolean isTransferFinished()
public boolean isNotOnServer()
true
if the file is not on the server, false
otherwisepublic FileTransferStatistics getStatistics()
public File getTransferredFile() throws FileTransferException
FileTransferException
- if the file is not yet fully transferredpublic File getTransferredFile(boolean block) throws FileTransferException
getTransferredFile()
, but this method blocks the
client thread.
block
- whether to block or not
FileTransferException
- in case of an error during transferpublic ProjectSpace getTransferringProjectSpace()
public Exception getException()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |