com.verygoodsecurity.watchman.kinesis.RecordHandler.kt Maven / Gradle / Ivy
package com.verygoodsecurity.watchman.kinesis
import com.verygoodsecurity.watchman.MessageHandler
class RecordHandler(private val listMapper: List) {
fun handle(payload: String): Boolean {
listMapper.stream()
.filter{handler -> handler.isProcessable(payload)}
.forEach { handler -> handler.handle(payload) }
return true
}
}