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

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Metadata key that stores the zero-based position of a chunk within a chunked message.
    static final String
    Metadata key that marks whether a chunk is the final part of a chunked message.
    static final String
    Metadata key that marks the first part of a chunked message.
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    Determines if the data associated with this metadata is "chunked".
    default boolean
    Determines if the data associated with this metadata is the first part of the data.
    Returns the Metadata associated with this object.
    default boolean
    Determines if the data associated with this metadata is the final part of the data.
  • Field Details

    • FIRST_CHUNK

      static final String FIRST_CHUNK
      Metadata key that marks the first part of a chunked message.
      See Also:
    • FINAL_CHUNK

      static final String FINAL_CHUNK
      Metadata key that marks whether a chunk is the final part of a chunked message.
      See Also:
    • CHUNK_INDEX

      static final String CHUNK_INDEX
      Metadata key that stores the zero-based position of a chunk within a chunked message.
      See Also:
  • Method Details

    • getMetadata

      Metadata getMetadata()
      Returns the Metadata 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 a FINAL_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 the FINAL_CHUNK key in the metadata. If it is missing or set to true, this method returns true.
      Returns:
      true if the metadata value for the FINAL_CHUNK key is true, false otherwise.
    • firstChunk

      default boolean firstChunk()
      Determines if the data associated with this metadata is the first part of the data. If the FIRST_CHUNK key is missing or set to true, this method returns true.
      Returns:
      true if the metadata value for the FIRST_CHUNK key is true, false otherwise.