Class AbstractHeaderGetter<T,C>
- java.lang.Object
-
- co.elastic.apm.agent.impl.transaction.AbstractHeaderGetter<T,C>
-
- All Implemented Interfaces:
HeaderGetter<T,C>
- Direct Known Subclasses:
MultiValueMapAccessor
public abstract class AbstractHeaderGetter<T,C> extends java.lang.Object implements HeaderGetter<T,C>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface co.elastic.apm.agent.impl.transaction.HeaderGetter
HeaderGetter.HeaderConsumer<T,S>
-
-
Constructor Summary
Constructors Constructor Description AbstractHeaderGetter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <S> voidforEach(java.lang.String headerName, C carrier, S state, HeaderGetter.HeaderConsumer<T,S> consumer)Calls the consumer for each header value with the given key until all entries have been processed or the action throws an exception.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface co.elastic.apm.agent.impl.transaction.HeaderGetter
getFirstHeader
-
-
-
-
Method Detail
-
forEach
public <S> void forEach(java.lang.String headerName, C carrier, S state, HeaderGetter.HeaderConsumer<T,S> consumer)Description copied from interface:HeaderGetterCalls the consumer for each header value with the given key until all entries have been processed or the action throws an exception.The third parameter lets callers pass in a stateful object to be modified with header values, so the
HeaderGetter.HeaderConsumerimplementation itself can be stateless and potentially reusable.- Specified by:
forEachin interfaceHeaderGetter<T,C>- Type Parameters:
S- the type of the state object- Parameters:
headerName- the name of the headercarrier- the object containing the headersstate- the object to be passed as the second parameter to each invocation on the specified consumerconsumer- the action to be performed for each header value
-
-