Interface TraceableMessage

    • Method Detail

      • getTracingContext

        Object getTracingContext​(String key)
        Gets some trace related context from the message for use by the tracing implementation.

        Allows the Tracing implementation to store context data into the message without the message needing to know what the types or structure of that data is.

        Parameters:
        key - The name of the context element to be looked up.
        Returns:
        the stored tracing context element or null if not present.
      • setTracingContext

        Object setTracingContext​(String key,
                                 Object value)
        Sets some trace related context from the message for use by the tracing implementation.

        Allows the Tracing implementation to store context data into the message without the message needing to know what the types or structure of that data is.

        Parameters:
        key - The key that the tracing context element should be stored under.
        value - The value to store under the given key.
        Returns:
        the previous value stored under the given key if any present.
      • removeTracingContext

        Object removeTracingContext​(String key)
        Removes some trace related context from the message.
        Parameters:
        key - The key of the tracing context element that should be cleared.
        Returns:
        the previous value stored under the given key if any present.
      • getTracingAnnotation

        Object getTracingAnnotation​(String key)
        Gets some trace specific message annotation that was previously applied to the given message either locally or by a remote peer.
        Parameters:
        key - The name of the tracing annotation data to retrieve.
        Returns:
        the tracing related annotation data under the given key.
      • removeTracingAnnotation

        Object removeTracingAnnotation​(String key)
        Remove some trace specific message annotation that was previously applied to the given message either locally or by a remote peer.
        Parameters:
        key - The name of the tracing annotation data to remove.
        Returns:
        the tracing related annotation data under the given key.
      • setTracingAnnotation

        Object setTracingAnnotation​(String key,
                                    Object value)
        Sets some trace specific message annotation that was previously applied to the given message either locally or by a remote peer.
        Parameters:
        key - The name of the tracing annotation data to store the trace data under.
        value - The value to store under the given key.
        Returns:
        the previous value stored under the given key if any present.
      • filterTracingAnnotations

        void filterTracingAnnotations​(BiConsumer<String,​Object> filter)
        Allows the tracing layer to filter out tracing related details from the full set of message annotations that a message might be carrying.
        Parameters:
        filter - The filter used to consume tracing related message annotations of interest.