Interface HeaderGetter<T,C>
-
- All Known Subinterfaces:
BinaryHeaderGetter<C>,TextHeaderGetter<C>
- All Known Implementing Classes:
AbstractHeaderGetter,MultiValueMapAccessor
public interface HeaderGetter<T,C>
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceHeaderGetter.HeaderConsumer<T,S>
-
Method Summary
All Methods Instance Methods Abstract 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.TgetFirstHeader(java.lang.String headerName, C carrier)
-
-
-
Method Detail
-
forEach
<S> void forEach(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.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.- 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
-
-