@Immutable public final class HeaderTranslator extends Object
Does so by applying blacklisting based on HeaderDefinitions.
| Modifier and Type | Method and Description |
|---|---|
static HeaderTranslator |
empty()
Construct a Ditto header translator that knows about nothing.
|
HeaderTranslator |
forgetHeaderKeys(Collection<String> headerKeys)
Build a copy of this header translator without knowledge of certain headers.
|
org.eclipse.ditto.model.base.headers.DittoHeaders |
fromExternalHeaders(Map<String,String> externalHeaders)
Read Ditto headers from external headers.
|
static HeaderTranslator |
of(org.eclipse.ditto.model.base.headers.HeaderDefinition[]... headerDefinitions)
Construct a Ditto header translator from arrays of header definitions.
|
Map<String,String> |
toExternalHeaders(org.eclipse.ditto.model.base.headers.DittoHeaders dittoHeaders)
Publish Ditto headers to external headers.
|
String |
toString() |
public static HeaderTranslator empty()
public static HeaderTranslator of(org.eclipse.ditto.model.base.headers.HeaderDefinition[]... headerDefinitions)
headerDefinitions - arrays of header definitions.public org.eclipse.ditto.model.base.headers.DittoHeaders fromExternalHeaders(Map<String,String> externalHeaders)
externalHeaders - external headers as a map.public Map<String,String> toExternalHeaders(org.eclipse.ditto.model.base.headers.DittoHeaders dittoHeaders)
dittoHeaders - Ditto headers to publish.public HeaderTranslator forgetHeaderKeys(Collection<String> headerKeys)
headerKeys - header keys to forget.Copyright © 2017–2019 Eclipse Foundation. All rights reserved.