org.enodeframework.messaging.Message.kt Maven / Gradle / Ivy
package org.enodeframework.messaging
import java.util.*
interface Message {
/**
* Represents the unique identifier of the message.
*/
var id: String
/**
* Represents the timestamp of the message.
*/
var timestamp: Date
/**
* Represents the extension key/values data of the message.
*/
var items: MutableMap
/**
* Merge the givens key/values into the current Items.
*/
fun mergeItems(data: MutableMap) {
if (data.isEmpty()) {
return
}
items.putAll(data)
}
}