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

io.fluxcapacitor.javaclient.common.Message Maven / Gradle / Ivy

There is a newer version: 0.1015.0
Show newest version
package io.fluxcapacitor.javaclient.common;

import io.fluxcapacitor.common.MessageType;
import io.fluxcapacitor.common.api.Metadata;
import lombok.AllArgsConstructor;
import lombok.Value;

@Value
@AllArgsConstructor
public class Message {
    Object payload;
    Metadata metadata;
    MessageType messageType;

    public Message(Object payload, MessageType messageType) {
        this(payload, Metadata.empty(), messageType);
    }

    @SuppressWarnings("unchecked")
    public  R getPayload() {
        return (R) payload;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy