Class MetadataToProperties
- All Implemented Interfaces:
Translator.BasicPropertiesBuilder
Creates a BasicProperties object from metadata. Top level headers such as
BasicProperties#getContentType() will be set by the configured
Translator.PropertiesBuilderFactory. Subsequently, any metadata that is still available post
filter via getHeaderFilter() will be added so they are available via
AMQP.BasicProperties.getHeaders().
Things like BasicProperties#getContentEncoding() and
BasicProperties#getContentType() are considered informational by Interlok; there is no
special treatment if you configure something as 'base64' or 'application/json'
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.rabbitmq.client.AMQP.BasicPropertiesbuild(com.adaptris.core.AdaptrisMessage msg) Add specific headers to any createdAMQP.BasicPropertiesobject.com.adaptris.core.metadata.MetadataFilterMetadata filter that filters metadata so that it is part ofcom.rabbitmq.client.BasicProperties#getHeaders().voidsetBuilderFactory(Translator.PropertiesBuilderFactory builderFactory) Add specific headers to any createdAMQP.BasicPropertiesobject.voidsetHeaderFilter(com.adaptris.core.metadata.MetadataFilter headerFilter) Metadata filter that filters metadata so that it is part ofcom.rabbitmq.client.BasicProperties#getHeaders().withFilter(com.adaptris.core.metadata.MetadataFilter filter)
-
Constructor Details
-
MetadataToProperties
public MetadataToProperties()
-
-
Method Details
-
build
public com.rabbitmq.client.AMQP.BasicProperties build(com.adaptris.core.AdaptrisMessage msg) - Specified by:
buildin interfaceTranslator.BasicPropertiesBuilder
-
withFilter
-
withBuilder
-
getHeaderFilter
public com.adaptris.core.metadata.MetadataFilter getHeaderFilter()Metadata filter that filters metadata so that it is part ofcom.rabbitmq.client.BasicProperties#getHeaders().If not explicitly configured no metadata is published.
-
setHeaderFilter
public void setHeaderFilter(com.adaptris.core.metadata.MetadataFilter headerFilter) Metadata filter that filters metadata so that it is part ofcom.rabbitmq.client.BasicProperties#getHeaders().If not explicitly configured no metadata is published.
-
getBuilderFactory
Add specific headers to any createdAMQP.BasicPropertiesobject.If not explicitly configured, then this will default to a no-op implementation which means that any
BasicPropertiesthat is created is determined solely by whether any message metadata should be included as part of theBasicProperties#getHeaders(). -
setBuilderFactory
Add specific headers to any createdAMQP.BasicPropertiesobject.If not explicitly configured, then this will default to a no-op implementation which means that any
BasicPropertiesthat is created is determined solely by whether any message metadata should be included as part of theBasicProperties#getHeaders().
-