接口 MetadataExtractor
- 所有已知实现类:
DefaultMetadataExtractor
public interface MetadataExtractor
Strategy to extract a map of value(s) fromPayload
metadata, which could be composite metadata with multiple entries. Each metadata entry is decoded based on itsMimeType
and a name is assigned to the decoded value. The resulting name-value pairs can be added to the headers of aMessage
.- 从以下版本开始:
- 5.2
- 作者:
- Rossen Stoyanchev
- 另请参阅:
MetadataExtractorRegistry
方法详细资料
extract
Map<String,Object> extract(io.rsocket.Payload payload, MimeType metadataMimeType)
Extract a map of values from the givenPayload
metadata. The Payload "route", if present, should be saved underROUTE_KEY
.- 参数:
payload
- the payload whose metadata should be readmetadataMimeType
- the metadata MimeType for the connection.- 返回:
- name values pairs extracted from the metadata
- 抛出:
DecodingException
- if the metadata cannot be decodedIllegalArgumentException
- if routing metadata cannot be decoded