myanmarking
10/20/2017, 4:15 PMmyanmarking
10/20/2017, 4:15 PMfstn
10/20/2017, 6:31 PMRxHelper.deployVerticle(vertx, ConfigurationVerticle())
.doOnCompleted({
RxHelper.deployVerticle(vertx, RunnerVerticle())
.doOnCompleted({
RxHelper.deployVerticle(vertx, FBRestVerticle()).subscribe()
}).subscribe()
}).subscribe()
The goal is to deploy all my verticlesmyanmarking
10/20/2017, 6:33 PMfstn
10/20/2017, 6:34 PMgabrielfv
10/20/2017, 9:38 PMread.subscribeOn(<http://Schedulers.io|Schedulers.io>())
.take(1)
.takeWhile { (it and 0x80.toByte()) == 0.toByte()}
.take(n)
Except that n
is a value that I determine based on the bytes I caught through takeWhile
. How can I fetch this value before performing the take(n)
?gabrielfv
10/20/2017, 9:45 PMvar n: Int = 0
read.subscribeOn(<http://Schedulers.io|Schedulers.io>())
.take(1)
.takeWhile {
n += (it % 0x80.toByte).toInt()
(it and 0x80.toByte()) == 0.toByte()
}.take(n)
Isn't idealedwardwongtl
10/21/2017, 10:32 AMfstn
10/22/2017, 7:41 AMedwardwongtl
10/22/2017, 8:06 AMonNext
and onComplete
belongs to the same stream, they must be the same typeedwardwongtl
10/22/2017, 8:07 AMonNext
, do it in doOnNext
and the before the stream ends, apply a `map`to transform it into MessageBody
fstn
10/22/2017, 8:07 AMfstn
10/22/2017, 8:08 AMmyanmarking
10/23/2017, 9:11 AMPaul Woitaschek
10/23/2017, 9:48 AMPaul Woitaschek
10/23/2017, 9:49 AMmyanmarking
10/23/2017, 9:55 AMmyanmarking
10/23/2017, 9:55 AMPaul Woitaschek
10/23/2017, 10:04 AMmyanmarking
10/23/2017, 10:14 AMfstn
10/25/2017, 12:24 PMnode.outgoingLinks
.toObservable()
.filter { it.checkCondition(messageBody) }
.map { it.eventName }
and it.checkCondition return an observable
I don’t know how to do thisjulienviet
10/25/2017, 12:31 PMjulienviet
10/25/2017, 12:31 PMjulienviet
10/25/2017, 12:32 PMjulienviet
10/25/2017, 12:32 PMjulienviet
10/25/2017, 12:33 PMjulienviet
10/25/2017, 12:33 PMfstn
10/25/2017, 12:33 PMfstn
10/25/2017, 12:33 PMreturn vertx.rxExecuteBlocking<List<String>> { future ->
val eventNamesToEmit = mutableListOf<String>()
eventNamesToEmit.addAll(
node.outgoingLinks
.filter { it.checkCondition(messageBody) }
.map { it.eventName }
)
if (eventNamesToEmit.isEmpty()) {
eventNamesToEmit.addAll(
node.outgoingLinks
.filter { it is ConditionalLink }
.filter { (it as ConditionalLink).condition == Condition.ELSE }
.map { it.eventName }
)
}
future.complete(eventNamesToEmit)
}
fstn
10/25/2017, 12:34 PM