All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.nofdev.topic.TopicMessage.groovy Maven / Gradle / Ivy

There is a newer version: 1.7.6
Show newest version
package org.nofdev.topic

import groovy.transform.CompileStatic

/**
 * Created by Liutengfei on 2016/5/6 0006.
 */
@CompileStatic
class TopicMessage {

    Map headers
    T payload

    void addHeader(String key, String value) {
        if (this.headers) {
            this.headers.put(key, value)
        } else {
            this.headers = new HashMap()
            this.headers.put(key, value)
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy