Created
May 9, 2017 18:04
-
-
Save ZherebtsovAlexandr/fbdf4fc93c389bbda071e88f74396fd5 to your computer and use it in GitHub Desktop.
GetEventDetailsInteractorImpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class GetEventDetailsInteractorImpl extends GetEventDetailsInteractor { | |
private final EventDataProvider eventDataProvider; | |
public GetEventDetailsInteractorImpl(int eventId, | |
ThreadExecutor threadExecutor, | |
PostExecutionThread postExecutionThread, | |
EventDataProvider eventDataProvider) { | |
super(threadExecutor, postExecutionThread); | |
this.eventDataProvider = eventDataProvider; | |
} | |
@Override | |
protected Observable buildUseCaseObservable() { | |
return eventDataProvider.getEventByIdLocal(this.eventId) | |
.mergeWith( | |
eventDataProvider.getEventByIdRemote(this.eventId) | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment