public static interface ITaskHunter.IMessageHandler
| Modifier and Type | Method and Description |
|---|---|
com.liulishuo.filedownloader.IFileDownloadMessenger |
getMessenger() |
MessageSnapshot |
prepareErrorMessage(Throwable cause) |
boolean |
updateKeepAhead(MessageSnapshot snapshot)
Try to dispatch the
snapshot with the keep ahead policy. |
boolean |
updateKeepFlow(MessageSnapshot snapshot)
Try to dispatch the
snapshot with the keep right flow policy. |
boolean |
updateMoreLikelyCompleted(MessageSnapshot snapshot)
Try to dispatch the
snapshot with the more likely completed policy. |
boolean |
updateSameFilePathTaskRunning(MessageSnapshot snapshot)
Try to dispatch the
snapshot with the same file path policy. |
boolean updateKeepAhead(MessageSnapshot snapshot)
snapshot with the keep ahead policy.snapshot - the received message snapshot.true the message has been dispatched successfully.boolean updateKeepFlow(MessageSnapshot snapshot)
snapshot with the keep right flow policy.snapshot - the received message snapshot.true the message has been dispatched successfully.boolean updateMoreLikelyCompleted(MessageSnapshot snapshot)
snapshot with the more likely completed policy.
The more likely completed policy: in some case the snapshot more likely to a waiting to complete task.
snapshot - the received message snapshot.true the message has been dispatched successfully.boolean updateSameFilePathTaskRunning(MessageSnapshot snapshot)
snapshot with the same file path policy.
The same file path policy: when the path provided by the user is a directory, we find the filename until the response from the service has been received, in this case when we find the target file path maybe can equal to another running task, so in this case, this task need callback a warn message.
snapshot - the received message snapshot.true the message has been dispatched successfully.com.liulishuo.filedownloader.IFileDownloadMessenger getMessenger()
MessageSnapshot prepareErrorMessage(Throwable cause)
cause - The cause of occurred exception.cause.