public interface MetadataExtractor
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
.Modifier and Type | Field and Description |
---|---|
static MimeType |
COMPOSITE_METADATA
Constant MimeType
"message/x.rsocket.composite-metadata.v0" . |
static String |
ROUTE_KEY
The key to assign to the extracted "route" of the payload.
|
static MimeType |
ROUTING
Constant for MimeType
"message/x.rsocket.routing.v0" . |
Modifier and Type | Method and Description |
---|---|
Map<String,Object> |
extract(io.rsocket.Payload payload,
MimeType metadataMimeType)
Extract a map of values from the given
Payload metadata. |
static final String ROUTE_KEY
static final MimeType COMPOSITE_METADATA
"message/x.rsocket.composite-metadata.v0"
.static final MimeType ROUTING
"message/x.rsocket.routing.v0"
.Map<String,Object> extract(io.rsocket.Payload payload, MimeType metadataMimeType)
Payload
metadata.
The Payload "route", if present, should be saved under ROUTE_KEY
.payload
- the payload whose metadata should be readmetadataMimeType
- the metadata MimeType for the connection.