org.springframework.messaging.rsocket

## Interface MetadataExtractorRegistry

All Known Implementing Classes:
  DefaultMetadataExtractor

    public interface MetadataExtractorRegistry

Stores registrations of extractors for metadata entries. Each metadata entry is decoded based on its `MimeType` and a name is assigned to the decoded value.

Since:
  5.2
Author:
  Rossen Stoyanchev, Brian Clozel
See Also:
  `MetadataExtractor`

### Method Summary

All Methods Instance Methods Abstract Methods Default Methods
`default void` `metadataToExtract(org.springframework.util.MimeType mimeType, Class<?> targetType, String name)` Decode metadata entries with the given `MimeType` to the specified target class, and store the decoded value in the output map under the given name.
`<T> void` `metadataToExtract(org.springframework.util.MimeType mimeType, Class<T> targetType, BiConsumer<T,Map<String,Object>> mapper)` Variant of `metadataToExtract(MimeType, Class, String)` that allows custom logic to be used to map the decoded value to any number of values in the output map.
`default void` `metadataToExtract(org.springframework.util.MimeType mimeType, org.springframework.core.ParameterizedTypeReference<?> targetType, String name)` Variant of `metadataToExtract(MimeType, Class, String)` that accepts `ParameterizedTypeReference` instead of `Class` for specifying a target type with generic parameters.
`<T> void` `metadataToExtract(org.springframework.util.MimeType mimeType, org.springframework.core.ParameterizedTypeReference<T> type, BiConsumer<T,Map<String,Object>> mapper)` Variant of `metadataToExtract(MimeType, Class, BiConsumer)` that accepts `ParameterizedTypeReference` instead of `Class` for specifying a target type with generic parameters.

### Method Detail

#### metadataToExtract

    default void metadataToExtract(org.springframework.util.MimeType mimeType,
                                   Class<?> targetType,
                                   @Nullable
                                   String name)

Decode metadata entries with the given `MimeType` to the specified target class, and store the decoded value in the output map under the given name.

Parameters:
  `mimeType` - the mime type of metadata entries to extract
  `targetType` - the target value type to decode to
  `name` - assign a name for the decoded value; if not provided, then the mime type is used as the key

#### metadataToExtract

    default void metadataToExtract(org.springframework.util.MimeType mimeType,
                                   org.springframework.core.ParameterizedTypeReference<?> targetType,
                                   @Nullable
                                   String name)

Variant of `metadataToExtract(MimeType, Class, String)` that accepts `ParameterizedTypeReference` instead of `Class` for specifying a target type with generic parameters.

Parameters:
  `mimeType` - the mime type of metadata entries to extract
  `targetType` - the target value type to decode to

#### metadataToExtract

    <T> void metadataToExtract(org.springframework.util.MimeType mimeType,
                               Class<T> targetType,
                               BiConsumer<T,Map<String,Object>> mapper)

Variant of `metadataToExtract(MimeType, Class, String)` that allows custom logic to be used to map the decoded value to any number of values in the output map.

Type Parameters:
  `T` - the target value type
Parameters:
  `mimeType` - the mime type of metadata entries to extract
  `targetType` - the target value type to decode to
  `mapper` - custom logic to add the decoded value to the output map

#### metadataToExtract

    <T> void metadataToExtract(org.springframework.util.MimeType mimeType,
                               org.springframework.core.ParameterizedTypeReference<T> type,
                               BiConsumer<T,Map<String,Object>> mapper)

Variant of `metadataToExtract(MimeType, Class, BiConsumer)` that accepts `ParameterizedTypeReference` instead of `Class` for specifying a target type with generic parameters.

Type Parameters:
  `T` - the target value type
Parameters:
  `mimeType` - the mime type of metadata entries to extract
  `type` - the target value type to decode to
  `mapper` - custom logic to add the decoded value to the output map