Class TagContextTextFormat.Getter<C>

  • Type Parameters:
    C - carrier of propagation fields, such as an http request
    Enclosing class:
    TagContextTextFormat

    public abstract static class TagContextTextFormat.Getter<C>
    extends java.lang.Object
    Class that allows a TagContextTextFormat to read propagated fields from a carrier.

    Getter is stateless and allows to be saved as a constant to avoid runtime allocations.

    Since:
    0.21
    • Constructor Summary

      Constructors 
      Constructor Description
      Getter()  
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      abstract java.lang.String get​(C carrier, java.lang.String key)
      Returns the first value of the given propagation key or returns null.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Getter

        public Getter()
    • Method Detail

      • get

        @Nullable
        public abstract java.lang.String get​(C carrier,
                                             java.lang.String key)
        Returns the first value of the given propagation key or returns null.
        Parameters:
        carrier - carrier of propagation fields, such as an http request
        key - the key of the field.
        Returns:
        the first value of the given propagation key or returns null.
        Since:
        0.21