Package 

Class CoroutineScopeOwner.UseCaseConfig.Builder

    • Method Summary

      Modifier and Type Method Description
      final Unit onStart(Function0<Unit> onStart) Set lambda that is called right before the internal Coroutine is created
      final Unit onSuccess(Function1<T, Unit> onSuccess) Set lambda that is called when internal Coroutine finished without exceptions
      final Unit onError(Function1<Throwable, Unit> onError) Set lambda that is called when exception on internal Coroutine occurs
      final Unit disposePrevious(Boolean disposePrevious) Set whether currently active Job of internal Coroutine should be canceled when execute is called repeatedly.
      final CoroutineScopeOwner.UseCaseConfig<T> build()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CoroutineScopeOwner.UseCaseConfig.Builder

        CoroutineScopeOwner.UseCaseConfig.Builder()
    • Method Detail

      • onStart

         final Unit onStart(Function0<Unit> onStart)

        Set lambda that is called right before the internal Coroutine is created

        Parameters:
        onStart - Lambda called right before Coroutine is created
      • onSuccess

         final Unit onSuccess(Function1<T, Unit> onSuccess)

        Set lambda that is called when internal Coroutine finished without exceptions

        Parameters:
        onSuccess - Lambda called when Coroutine finished
      • onError

         final Unit onError(Function1<Throwable, Unit> onError)

        Set lambda that is called when exception on internal Coroutine occurs

        Parameters:
        onError - Lambda called when exception occurs
      • disposePrevious

         final Unit disposePrevious(Boolean disposePrevious)

        Set whether currently active Job of internal Coroutine should be canceled when execute is called repeatedly. Default value is true.

        Parameters:
        disposePrevious - True if active Job of internal Coroutine should be canceled.