-
- Enclosing interface:
- Atomos
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface @ConsumerType public static interface Atomos.HeaderProvider extends BiFunction<String,Map<String,String>,Optional<Map<String,String>>>
A function that maps eachAtomosContent
location
and its existing headers to a new optional map of headers to be used for theheaders
of theConnectContent
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Optional<Map<String,String>>
apply(String location, Map<String,String> existingHeaders)
Applies this header provider function to the specifiedAtomosContent
location
and map of existing headers.-
Methods inherited from interface java.util.function.BiFunction
andThen
-
-
-
-
Method Detail
-
apply
Optional<Map<String,String>> apply(String location, Map<String,String> existingHeaders)
Applies this header provider function to the specifiedAtomosContent
location
and map of existing headers. The returnedOptional
map of headers will be used by theConnectContent.getHeaders()
method for theConnectContent
associated
with theAtomosContent
that has the specifiedlocation
.This method allows a header provider to augment existing bundle manifest headers or add completely new bundle manifest headers that are not present in the existing headers.
This function may be applied before the instance of the
AtomosContent
instance is created which may result in the symbolic name and or version of theAtomosContent
to be influenced by this function.- Specified by:
apply
in interfaceBiFunction<String,Map<String,String>,Optional<Map<String,String>>>
- Parameters:
location
- TheAtomosContent
location
existingHeaders
- The existing headers found for theAtomosContent
- Returns:
- the
Optional
map of headers to use instead of theexistingHeaders
. If the existing headers should be used then an emptyOptional
may be returned.
-
-