org.springframework.messaging.rsocket

## Interface MetadataExtractor

All Known Implementing Classes:
  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`.

Since:
  5.2
Author:
  Rossen Stoyanchev
See Also:
  `MetadataExtractorRegistry`

### Field Summary

Fields
`static String` `ROUTE_KEY` The key to assign to the extracted "route" of the payload.

### Method Summary

All Methods Instance Methods Abstract Methods
`Map<String,Object>` `extract(io.rsocket.Payload payload, org.springframework.util.MimeType metadataMimeType)` Extract a map of values from the given `Payload` metadata.

### Field Detail

#### ROUTE_KEY

    static final String ROUTE_KEY

The key to assign to the extracted "route" of the payload.

See Also:
  Constant Field Values

### Method Detail

#### extract

    Map<String,Object> extract(io.rsocket.Payload payload,
                               org.springframework.util.MimeType metadataMimeType)

Extract a map of values from the given `Payload` metadata. The Payload "route", if present, should be saved under `ROUTE_KEY`.

Parameters:
  `payload` - the payload whose metadata should be read
  `metadataMimeType` - the metadata MimeType for the connection.
Returns:
  name values pairs extracted from the metadata
Throws:
  `org.springframework.core.codec.DecodingException` - if the metadata cannot be decoded
  `IllegalArgumentException` - if routing metadata cannot be decoded