Interface TraceableMessage

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void filterTracingAnnotations​(java.util.function.BiConsumer<java.lang.String,​java.lang.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.
      java.lang.Object getTracingAnnotation​(java.lang.String key)
      Gets some trace specific message annotation that was previously applied to the given message either locally or by a remote peer.
      java.lang.Object getTracingContext​(java.lang.String key)
      Gets some trace related context from the message for use by the tracing implementation.
      java.lang.Object removeTracingAnnotation​(java.lang.String key)
      Remove some trace specific message annotation that was previously applied to the given message either locally or by a remote peer.
      java.lang.Object removeTracingContext​(java.lang.String key)
      Removes some trace related context from the message.
      java.lang.Object setTracingAnnotation​(java.lang.String key, java.lang.Object value)
      Sets some trace specific message annotation that was previously applied to the given message either locally or by a remote peer.
      java.lang.Object setTracingContext​(java.lang.String key, java.lang.Object value)
      Sets some trace related context from the message for use by the tracing implementation.
    • Method Detail

      • getTracingContext

        java.lang.Object getTracingContext​(java.lang.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

        java.lang.Object setTracingContext​(java.lang.String key,
                                           java.lang.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

        java.lang.Object removeTracingContext​(java.lang.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

        java.lang.Object getTracingAnnotation​(java.lang.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

        java.lang.Object removeTracingAnnotation​(java.lang.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

        java.lang.Object setTracingAnnotation​(java.lang.String key,
                                              java.lang.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​(java.util.function.BiConsumer<java.lang.String,​java.lang.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.