Package 

Class SingleUseCase


  • 
    public abstract class SingleUseCase<ARGS extends Object, T extends Object>
    extends BaseUseCase
                        

    Base use case which wraps Single. Instance of this use case can be simply executed in cooperation with app.futured.arkitekt.rxusecases.disposables.SingleDisposablesOwner interface.

    Wrapped stream is subscribed on io.reactivex.schedulers.Schedulers.io and observed on io.reactivex.android.schedulers.AndroidSchedulers.mainThread by default. You may override these through workScheduler and resultScheduler respectively.

    • Constructor Summary

      Constructors 
      Constructor Description
      SingleUseCase()
    • Method Summary

      Modifier and Type Method Description
      final Single<T> create(ARGS args) Creates internal Single Rx stream, applies requested work & result schedulers and exposes this stream as a Single.
      • Methods inherited from class java.lang.Object

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

      • SingleUseCase

        SingleUseCase()
    • Method Detail

      • create

         final Single<T> create(ARGS args)

        Creates internal Single Rx stream, applies requested work & result schedulers and exposes this stream as a Single. This method is handy when you want to combine streams of multiple use cases. For example:

        usecase_A.create().flatMap { usecase_B.create() }