io.fluxcapacitor.javaclient.common.Message Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-client Show documentation
Show all versions of java-client Show documentation
Default Java client library for interfacing with Flux Capacitor.
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;
}
}