package Ġale j and rom r 9 2 . com . movies . domain . inter actor . impl Ċ Ċ import Ġale j and rom r 9 2 . com . movies . domain . inter actor . Get Pop ular Movies Interactor Ċ import Ġale j and rom r 9 2 . com . movies . domain . model . Movie Ċ import Ġale j and rom r 9 2 . com . movies . storage . repositories . Movie Repository Ċ import Ġio . reactivex . Scheduler Ċ import Ġio . reactivex . dis pos ables . Disposable Ċ import Ġio . reactivex . dis pos ables . Dis pos ables Ċ Ċ class ĠGet Pop ular Movies Interactor Impl ( ĊĠĠĠ Ġprivate Ġval Ġmovie Repository : ĠMovie Repository , ĊĠĠĠ Ġprivate Ġval Ġobserve On : ĠScheduler , ĊĠĠĠ Ġprivate Ġval Ġsubscribe On : ĠScheduler Ċ ) Ġ: ĠGet Pop ular Movies Interactor Ġ{ ĊĊĠĠĠ Ġprivate Ġvar Ġsubscription : ĠDis posable Ġ= ĠDis pos ables . empty () ĊĊĠĠĠ Ġoverride Ġfun Ġexecute ( page : ĠInt , ĠonComplete : Ġ( List < Movie >) Ġ-> ĠUnit , ĠonError : Ġ( Throwable ) Ġ-> ĠUnit ){ ĊĠĠĠĠĠĠĠ Ġsubscription Ġ= Ġmovie Repository . get Pop ular Movies ( page ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. subscribe On ( subscribe On ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. observe On ( observe On ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. subscribe ( onComplete , ĠonError ) ĊĠĠĠ Ġ} Ċ } Ċ