-
- 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 eachAtomosContentlocationand its existing headers to a new optional map of headers to be used for theheadersof 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 specifiedAtomosContentlocationand 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 specifiedAtomosContentlocationand map of existing headers. The returnedOptionalmap of headers will be used by theConnectContent.getHeaders()method for theConnectContentassociatedwith theAtomosContentthat 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
AtomosContentinstance is created which may result in the symbolic name and or version of theAtomosContentto be influenced by this function.- Specified by:
applyin interfaceBiFunction<String,Map<String,String>,Optional<Map<String,String>>>- Parameters:
location- TheAtomosContentlocationexistingHeaders- The existing headers found for theAtomosContent- Returns:
- the
Optionalmap of headers to use instead of theexistingHeaders. If the existing headers should be used then an emptyOptionalmay be returned.
-
-