接口 MetadataExtractor

  • 所有已知实现类:
    DefaultMetadataExtractor

    public interface MetadataExtractor
    Strategy to extract a map of value(s) from Payload metadata, which could be composite metadata with multiple entries. Each metadata entry is decoded based on its MimeType and a name is assigned to the decoded value. The resulting name-value pairs can be added to the headers of a Message.
    从以下版本开始:
    5.2
    作者:
    Rossen Stoyanchev
    另请参阅:
    MetadataExtractorRegistry
    • 字段概要

      字段 
      修饰符和类型字段说明
      static StringROUTE_KEY
      The key to assign to the extracted "route" of the payload.
    • 方法详细资料

      • extract

        Map<String,​Objectextract​(io.rsocket.Payload payload,
                                         MimeType metadataMimeType)
        Extract a map of values from the given Payload metadata. The Payload "route", if present, should be saved under ROUTE_KEY.
        参数:
        payload - the payload whose metadata should be read
        metadataMimeType - the metadata MimeType for the connection.
        返回:
        name values pairs extracted from the metadata
        抛出:
        DecodingException - if the metadata cannot be decoded
        IllegalArgumentException - if routing metadata cannot be decoded