Enum Class UploadState
- All Implemented Interfaces:
Serializable, Comparable<UploadState>, Constable
The states of one file inside an upload reservation, in the order they normally occur.
A file moves RESERVED → UPLOADING → COMPLETE → VERIFIED → CONSUMED; the three terminal states CONSUMED, FAILED and CANCELLED release the file's quota, and REFUSED is the state of a file the reservation never accepted. PAUSED is a detour from RESERVED or UPLOADING, taken by the App or by the client and left on resume.
- Author:
- Christopher Mindus
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E>Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionCancelled by the client, the App, a timeout or disposal; the file has been deleted.The last chunk has been received; verification has not run yet.Ownership was taken by the API user, or the file was deleted by it; never swept.Verification or the transfer failed; the file has been deleted.Never accepted by the reservation (quota, size, type, count).Accepted by the reservation, no byte received yet.At least one chunk has been received and acknowledged.Verified (type and size) and handed to the listener; still owned by the server.Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if the state is terminal, i.e.static UploadStateReturns the enum constant of this class with the specified name.static UploadState[]values()Returns an array containing the constants of this enum class, in the order they are declared.
Enum Constant Details
RESERVED
Accepted by the reservation, no byte received yet.UPLOADING
At least one chunk has been received and acknowledged.PAUSED
COMPLETE
The last chunk has been received; verification has not run yet.VERIFIED
Verified (type and size) and handed to the listener; still owned by the server.CONSUMED
Ownership was taken by the API user, or the file was deleted by it; never swept. Terminal.FAILED
Verification or the transfer failed; the file has been deleted. Terminal.CANCELLED
Cancelled by the client, the App, a timeout or disposal; the file has been deleted. Terminal.REFUSED
Never accepted by the reservation (quota, size, type, count). Terminal.
Method Details
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
isTerminal