Package 

Class CoroutineScopeOwner.FlowUseCaseConfig.Builder

    • Method Summary

      Modifier and Type Method Description
      final Unit onStart(Function0<Unit> onStart) Set lambda that is called right before internal Job of Flow is launched.
      final Unit onNext(Function1<T, Unit> onNext) Set lambda that is called when internal Flow emits new value
      final Unit onError(Function1<Throwable, Unit> onError) Set lambda that is called when some exception on internal Flow occurs
      final Unit onComplete(Function0<Unit> onComplete) Set lambda that is called when internal Flow is completed without errors
      final Unit disposePrevious(Boolean disposePrevious) Set whether currently running Job of internal Flow should be canceled when execute is called repeatedly.
      final CoroutineScopeOwner.FlowUseCaseConfig<T> build()
      • Methods inherited from class java.lang.Object

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

      • CoroutineScopeOwner.FlowUseCaseConfig.Builder

        CoroutineScopeOwner.FlowUseCaseConfig.Builder()
    • Method Detail

      • onStart

         final Unit onStart(Function0<Unit> onStart)

        Set lambda that is called right before internal Job of Flow is launched.

        Parameters:
        onStart - Lambda called right before Flow Job is launched.
      • onNext

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

        Set lambda that is called when internal Flow emits new value

        Parameters:
        onNext - Lambda called for every new emitted value
      • onError

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

        Set lambda that is called when some exception on internal Flow occurs

        Parameters:
        onError - Lambda called when exception occurs
      • onComplete

         final Unit onComplete(Function0<Unit> onComplete)

        Set lambda that is called when internal Flow is completed without errors

        Parameters:
        onComplete - Lambda called when Flow is completed without errors
      • disposePrevious

         final Unit disposePrevious(Boolean disposePrevious)

        Set whether currently running Job of internal Flow should be canceled when execute is called repeatedly.

        Parameters:
        disposePrevious - True if currently running Job of internal Flow should be canceled