Interface ChannelPayload

All Known Implementing Classes:
CommandPayload

public interface ChannelPayload
Marker interface for all data types that can be sent over a MessageChannel.

Implementing this interface registers a type as a valid payload. The MessageChannel uses the payload's Class token for channel routing and type-safe dispatch.

CommandPayload is the built-in implementation for command execution. Custom payload types can be created by implementing this interface:


 public record MyPayload(String data) implements ChannelPayload {
 }
 
See Also: