Interface CopyStatus
-
public interface CopyStatus
CopyStatus contains status information for a specific copy operation.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description long
bytesCopied()
Get the number of bytes that have been copied.long
bytesToCopy()
Get the number of bytes that need to be copied for the entire copy operation.java.lang.String
getCopyIdentifier()
Get the copy identifier for which this CopyStatus was created.XenonException
getException()
Get the exception produced by the Copy or while retrieving the status.java.lang.String
getState()
Get the state of the Copy operation.boolean
hasException()
Has the Copy or status retrieval produced a exception ?boolean
isDone()
Is the Copy done?boolean
isRunning()
Is the Copy still running?void
maybeThrowException()
Throws the exception that occured during copying, if it exists.
-
-
-
Method Detail
-
getCopyIdentifier
java.lang.String getCopyIdentifier()
Get the copy identifier for which this CopyStatus was created.- Returns:
- the Copy.
-
getState
java.lang.String getState()
Get the state of the Copy operation.- Returns:
- the state of the Copy operation.
-
getException
XenonException getException()
Get the exception produced by the Copy or while retrieving the status. If there was no exception,null
will be returned. SeemaybeThrowException()
for the possible exceptions.- Returns:
- the exception.
-
maybeThrowException
void maybeThrowException() throws XenonException
Throws the exception that occured during copying, if it exists. Otherwise continue.- Throws:
PathAlreadyExistsException
- If the target already exists and the mode isCopyMode.CREATE
.CopyCancelledException
- If the copy was cancelled viaFileSystem.cancel(String)
NoSuchPathException
- If the source does not exist or the target's parent does not existnl.esciencecenter.xenon.adaptors.NotConnectedException
- If file system is closed.XenonException
- if an I/O error occurred.
-
isRunning
boolean isRunning()
Is the Copy still running?- Returns:
- if the Copy is running.
-
isDone
boolean isDone()
Is the Copy done?- Returns:
- if the Copy is done.
-
hasException
boolean hasException()
Has the Copy or status retrieval produced a exception ?- Returns:
- if the Copy or status retrieval produced a exception.
-
bytesToCopy
long bytesToCopy()
Get the number of bytes that need to be copied for the entire copy operation.- Returns:
- the number of bytes that need to be copied.
-
bytesCopied
long bytesCopied()
Get the number of bytes that have been copied.- Returns:
- the number of bytes that have been copied.
-
-