use_in_case library

Classes

InlinedParameterizedResultInteractor<Input, Output>
ParameterizedResultInteractor<Input, Output>
Defines the interface for an interactor. All interactors must implement this interface in order to fit into the use case architecture.
ParameterizedResultProgressInteractor<Input, Output, Progress>
Defines the interface for an interactor that emits progress. This interface should be used when you want to emit progress events during the execution of the interactor. The Input type is the type of the input that the interactor will receive. The Output type is the type of the output that the interactor will return. The Progress type is the type of the progress event that will be emitted.

Extensions

AfterExt on ParameterizedResultInteractor<Input, Output>
This extension provides a method to receive the result of an interactor.
BeforeExt on ParameterizedResultInteractor<Input, Output>
This extension provides a method to execute a callback before the interactor
BusyStateExt on ParameterizedResultInteractor<Input, Output>
This extension provides methods to observe the busy state of an interactor.
EnsureMinExecutionTimeExt on ParameterizedResultInteractor<Input, Output>
EventuallyExt on ParameterizedResultInteractor<Input, Output>
This extension provides a method to execute a callback after the interactor has finished.
InterceptExt on ParameterizedResultInteractor<Input, Output>
Extension that adds the intercept method to the ParameterizedResultInteractor class. This method allows you to intercept exceptions thrown by the interactor's getOrThrow method. The callback will be called with the exception that was thrown. The exception will be rethrown after the callback has been executed.
InvokeExt on ParameterizedResultInteractor<Input, Output>
LogExt on ParameterizedResultInteractor<Input, Output>
Extension that adds the logEvents and log methods to the ParameterizedResultInteractor class. These methods allow you to log the start, success, and error events of the interactor. You can specify custom log messages for each event. The logEvents method allows you to specify a different log message for each event.
MapExt on ParameterizedResultInteractor<Input, Output>
This extension provides a method to map the output of an interactor.
MeasureTimeExt on ParameterizedResultInteractor<Input, Output>
This extension provides methods to measure the time it takes to run an interactor.
ReceiveProgressExtension on ParameterizedResultProgressInteractor<Input, Output, Progress>
Extension that adds the receiveProgress method to the ParameterizedResultProgressInteractor class. This method allows you to receive progress events emitted by the interactor. The callback will be called with the progress event that was emitted.
RecoverExt on ParameterizedResultInteractor<Input, Output>
Adds the recover method to the ParameterizedResultInteractor class. This method allows you to recover from an exception thrown by the interactor's getOrThrow method. The callback will be called with the exception that was thrown. The result of the callback will be returned instead of the exception.
TimeoutExt on ParameterizedResultInteractor<Input, Output>
Extension that adds the timeout method to the ParameterizedResultInteractor class. This method allows you to specify a timeout for the interactor's getOrThrow method. If the interactor takes longer than the specified duration, a TimeoutException will be thrown. You can also specify a custom error message for the TimeoutException.

Typedefs

Interactor = ParameterizedResultInteractor<Unit, void>
IsBusy = bool
Type alias for the busy state.
ParameterizedInteractor<Input> = ParameterizedResultInteractor<Input, void>
ParameterizedProgressInteractor<Input, Progress> = ParameterizedResultProgressInteractor<Input, void, Progress>
ProgressInteractor<Progress> = ParameterizedResultProgressInteractor<Unit, void, Progress>
ResultInteractor<Output> = ParameterizedResultInteractor<Unit, Output>
ResultProgressInteractor<Output, Progress> = ParameterizedResultProgressInteractor<Unit, Output, Progress>
TimedValue<Output> = (Duration, Output)

Exceptions / Errors

HandledException<ExceptionType extends Exception>
Exception that gets thrown when an exception has already been handled in the checkedIntercept method.