Interface HasMetadata
- All Known Subinterfaces:
HasMessage
- All Known Implementing Classes:
ChunkedDeserializingMessage, DefaultEntityHelper.DeserializingMessageWithEntity, DefaultEntityHelper.MessageWithEntity, DeserializingMessage, Message, Schedule, SerializedMessage, StatefulHandler.StatefulHandlerSearchMessage, StatefulHandler.StatefulMemberMessage, 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 Fluxzero Runtime.
Typical implementers include Message, SerializedMessage, and custom types that participate in message
tracking or enrichment.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringMetadata key that stores the zero-based position of a chunk within a chunked message.static final StringMetadata key that marks whether a chunk is the final part of a chunked message.static final StringMetadata key that marks the first part of a chunked message. -
Method Summary
Modifier and TypeMethodDescriptiondefault booleanchunked()Determines if the data associated with this metadata is "chunked".default booleanDetermines if the data associated with this metadata is the first part of the data.Returns theMetadataassociated with this object.default booleanDetermines if the data associated with this metadata is the final part of the data.
-
Field Details
-
FIRST_CHUNK
Metadata key that marks the first part of a chunked message.- See Also:
-
FINAL_CHUNK
Metadata key that marks whether a chunk is the final part of a chunked message.- See Also:
-
CHUNK_INDEX
Metadata key that stores the zero-based position of a chunk within a chunked message.- See Also:
-
-
Method Details
-
getMetadata
-
chunked
default boolean chunked()Determines if the data associated with this metadata is "chunked". This method checks if the metadata contains aFINAL_CHUNKkey.- Returns:
- true if the metadata contains the
FINAL_CHUNKkey, 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_CHUNKkey in the metadata. If it is missing or set totrue, this method returnstrue.- Returns:
- true if the metadata value for the
FINAL_CHUNKkey istrue, false otherwise.
-
firstChunk
default boolean firstChunk()Determines if the data associated with this metadata is the first part of the data. If theFIRST_CHUNKkey is missing or set totrue, this method returnstrue.- Returns:
- true if the metadata value for the
FIRST_CHUNKkey istrue, false otherwise.
-