Simple Completion Handler
class SimpleCompletionHandler<V>(completed: SimpleCompletionHandler.Companion.SuccessHelper<V>.() -> Unit, failed: SimpleCompletionHandler.Companion.FailureHelper<V>.() -> Unit) : CompletionHandler<V, Unit>
Content copied to clipboard
A convenient CompletionHandler implementation that takes two lambdas at construction, avoiding the hideous inner class notation.
Parameters
V
The kind of values produced on success.
Constructors
Link copied to clipboard
fun <V> SimpleCompletionHandler(completed: SimpleCompletionHandler.Companion.SuccessHelper<V>.() -> Unit, failed: SimpleCompletionHandler.Companion.FailureHelper<V>.() -> Unit)
Content copied to clipboard
Types
Functions
Link copied to clipboard
fun guardedDo(op: SimpleCompletionHandler.Companion.GuardHelper<V>.() -> Unit)
Content copied to clipboard
Perform the specified I/O operation, guarded by a try/catch that invokes the same failure handler as the operation itself would in the event of an asynchronous failure.