package Ġcom . wo ow r ale . k room app . use cases . base Ċ Ċ import Ġcom . wo ow r ale . k room app . use cases . threads . Job Scheduler Ċ import Ġcom . wo ow r ale . k room app . use cases . threads . UIS cheduler Ċ import Ġio . reactivex . Single Ċ import Ġio . reactivex . dis pos ables . Disposable Ċ import Ġio . reactivex . ob servers . Disposable Single Observer Ċ Ċ abstract Ġclass ĠBase UseCase < Observer , ĠParams > Ġconstructor ( ĊĠĠĠĠĠĠĠ Ġprivate Ġval Ġui Scheduler : ĠU IS cheduler , ĊĠĠĠĠĠĠĠ Ġprivate Ġval Ġjob Scheduler : ĠJob Scheduler Ċ ) Ġ{ ĊĊĠĠĠ Ġprotected Ġabstract Ġfun Ġbuild UseCase Observable ( params : ĠParams ): ĠSingle < Observer > ĊĊĠĠĠ Ġfun Ġexecute ( observer : ĠDis posable Single Observer < Observer >, Ġparams : ĠParams ): ĠDis posable Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġobservable Ġ= Ġbuild UseCase Observable ( params ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. observe On ( ui Scheduler . scheduler ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. subscribe On ( job Scheduler . scheduler ) ĊĠĠĠĠĠĠĠ Ġreturn Ġobservable . subscribe With ( observer ) ĊĠĠĠ Ġ} Ċ }