Package io.fluxcapacitor.common.api
Interface HasMetadata
- All Known Subinterfaces:
HasMessage
- All Known Implementing Classes:
DefaultEntityHelper.DeserializingMessageWithEntity
,DefaultEntityHelper.MessageWithEntity
,DeserializingMessage
,Message
,Schedule
,SerializedMessage
,WebRequest
,WebResponse
public interface HasMetadata
Marker interface for objects that carry associated
Metadata
.
Implementations of this interface expose a structured metadata map that can be used for routing, correlation, trace propagation, or other contextual behavior within the Flux platform.
Typical implementers include Message
, SerializedMessage
, and custom types that participate in message
tracking or enrichment.
- See Also:
-
Field Summary
Fields -
Method Summary
-
Field Details
-
FINAL_CHUNK
- See Also:
-
-
Method Details
-
getMetadata
Metadata getMetadata()Returns theMetadata
associated with this object.- Returns:
- metadata attached to this instance; never
null
-
chunked
default boolean chunked()Determines if the data associated with this metadata is "chunked". This method checks if the metadata contains aFINAL_CHUNK
key.- Returns:
- true if the metadata contains the
FINAL_CHUNK
key, false otherwise.
-
lastChunk
default boolean lastChunk()Determines if the data associated with this metadata is the final part of the data. This method evaluates the value of theFINAL_CHUNK
key in the metadata. If it is missing or set totrue
, this method returnstrue
.- Returns:
- true if the metadata value for the
FINAL_CHUNK
key istrue
, false otherwise.
-