EntryStreamListener
Interface for listening to state changes and exchanging data with an InboxEntryStream instance.
This interface provides callbacks for various events that occur during the lifecycle of an Inbox entry stream, such as starting and ending file sending, requesting file chunks, handling errors, and updating the stream state.
Implement this interface to monitor and interact with the entry stream.
Constructors
EntryStreamListener
Methods
onEndFileSending
Override this method to handle when file was sent successfully.
Params
file
FileInfo
information about the sent file
onError
Override this method to handle event when an error occurs while creating entry.
Params
throwable
Throwable
exception that occurred while creating an entry
onErrorDuringSending
Override this method to handle event when an error occurs while sending files.
Params
file
FileInfo
information about the file that caused the error
throwable
Throwable
exception that occurred while sending files
onFileChunkProcessed
Override this method to handle event when each chunk of a file was sent successfully.
Params
file
FileInfo
information about the file, which chunk was processed
processedBytes
long
accumulated size of sent data
onNextChunkRequest
Override this method to handle event when FileInfo#fileStream is null
and the stream requests a chunk of the file to send.
If you override this method, you should return the next chunk of the file.
Returning null will cause a
NullPointerException while sending the file and stop the InboxEntryStream instance with
the state State#ERROR.
Params
file
FileInfo
info about the file, which chunk is requested
Returns
byte[] ·
next chunk of the file
onStartFileSending
Override this method to handle when the process of sending file starts.
Params
file
FileInfo
information about the file being sent
onUpdateState
Override this method to handle event when stream state has been updated.
Params
currentState
State
current state of the stream
We use cookies on our website. We use them to ensure proper functioning of the site and, if you agree, for purposes such as analytics, marketing, and targeting ads.