Interface MessageSpec<T>
- Type Parameters:
T- the message payload type
- All Known Subinterfaces:
InternalMessageSpec<T>
public interface MessageSpec<T>
Interface for the spec of a message to be sent.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> MessageSpecBuilder<T>builder(T value) Creates a message spec builder from a value.default <C> CGets the correlation metadata of this message spec.getValue()Gets the value of this message spec.static <T> MessageSpec<T>of(T value) Creates a message spec from a value.
-
Method Details
-
builder
Creates a message spec builder from a value.- Type Parameters:
T- the message payload type- Parameters:
value- the value to create the message spec builder from- Returns:
- the message spec builder
-
of
Creates a message spec from a value.- Type Parameters:
T- the message payload type- Parameters:
value- the value to create the message spec from- Returns:
- the message spec
-
getCorrelationMetadata
default <C> C getCorrelationMetadata()Gets the correlation metadata of this message spec.- Type Parameters:
C- the correlation metadata type- Returns:
- the correlation metadata
-
getValue
T getValue()Gets the value of this message spec.- Returns:
- the value of this message spec
-