Interface DittoAttachmentFetchResult
- All Known Implementing Classes:
DittoAttachmentFetchResult.Completed,DittoAttachmentFetchResult.Deleted
public sealed interface DittoAttachmentFetchResult
permits DittoAttachmentFetchResult.Completed, DittoAttachmentFetchResult.Deleted
The result of fetching an attachment.
Updates relating to an attachment fetch are delivered by registering a DittoAttachmentFetcher
through a call to DittoStore.fetchAttachment.
This is a sealed interface with two possible outcomes:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classEvent signaling the completion of an attachment download.static final classEvent signaling the deletion of an attachment. -
Method Summary
Modifier and TypeMethodDescription@Nullable DittoAttachmentFetchResult.CompletedAttempts to cast this result to a Completed result.@Nullable DittoAttachmentFetchResult.DeletedAttempts to cast this result to a Deleted result.
-
Method Details
-
asCompleted
@Nullable DittoAttachmentFetchResult.Completed asCompleted()Attempts to cast this result to a Completed result.- Returns:
- this as
DittoAttachmentFetchResult.Completedif successful,nullotherwise.
-
asDeleted
@Nullable DittoAttachmentFetchResult.Deleted asDeleted()Attempts to cast this result to a Deleted result.- Returns:
- this as
DittoAttachmentFetchResult.Deletedif successful,nullotherwise.
-