Package 

Class SingleUseCaseConfig.Builder


  • 
    public final class SingleUseCaseConfig.Builder<T extends Object>
    
                        

    Constructs references to lambdas and some basic configuration used to process results of Singler use case.

    • Method Summary

      Modifier and Type Method Description
      final Unit onStart(Function0<Unit> onStart) Set lambda which is called right before internal Single is subscribed
      final Unit onSuccess(Function1<T, Unit> onSuccess) Set lambda which is called when onSuccess on internal Single is called
      final Unit onError(Function1<Throwable, Unit> onError) Set lambda which is called when onError on internal Single is called
      final Unit disposePrevious(Boolean disposePrevious) Set whether currently running internal Single should be disposed when execute is called repeatedly.
      final SingleUseCaseConfig<T> build()
      • Methods inherited from class java.lang.Object

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

      • SingleUseCaseConfig.Builder

        SingleUseCaseConfig.Builder()
    • Method Detail

      • onStart

         final Unit onStart(Function0<Unit> onStart)

        Set lambda which is called right before internal Single is subscribed

        Parameters:
        onStart - Lambda called right before Single is subscribed.
      • onSuccess

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

        Set lambda which is called when onSuccess on internal Single is called

        Parameters:
        onSuccess - Lambda called when onSuccess is emitted.
      • onError

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

        Set lambda which is called when onError on internal Single is called

        Parameters:
        onError - Lambda called when onError is emitted.
      • disposePrevious

         final Unit disposePrevious(Boolean disposePrevious)

        Set whether currently running internal Single should be disposed when execute is called repeatedly.

        Parameters:
        disposePrevious - True if currently running internal Single should be disposed