それぞれEvent
については、送信して検証する必要があります。Issue chaining flatMapCompletableの後に完了
fun process(): Completable =
eventsDao.findAll()
.flatMapCompletable(this::sendEventToServer)
.andThen(this::validate) //Error here
fun send(event: Event): Completable =
//code
fun validate(event: Event): Completable =
//code
Error:(14, 18) None of the following functions can be called with the arguments supplied: @CheckReturnValue @SchedulerSupport public final fun andThen(p0: ((CompletableObserver) -> Unit)!): Completable! defined in io.reactivex.Completable
@CheckReturnValue @SchedulerSupport public final fun andThen(p0: ((MaybeObserver) -> Unit)!): Maybe<(???..???)>! defined in io.reactivex.Completable
@CheckReturnValue @SchedulerSupport public final fun andThen(p0: ((Observer) -> Unit)!): Observable<(???..???)>! defined in io.reactivex.Completable
and so on
問題がここにいることである:
.andThen(this::validate)
私はevent
自体を持っていない私はこのコードを持っています。これらのチェーンをどうすればいいですか?Completable
?私は本当に何かアドバイスやそれに
fun process(): Completable =
eventsDao.findAll()
.flatMapCompletable(this::processEvent)
fun processEvent(event: Event) =
send(event).concatWith(validate(event))
: