Interface WebResponseMapper
- All Superinterfaces:
ResponseMapper
- All Known Implementing Classes:
DefaultWebResponseMapper
Specialization of
ResponseMapper for mapping responses to WebResponse messages.
This interface provides a default implementation that handles Message instances directly,
extracting their payload and metadata before invoking the two-argument map(Object, Metadata) method.
Used for mapping the return values of web request handlers into WebResponse objects to be
published to the WebResponse log.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault WebResponseMaps a generic response object to aWebResponse.Maps a response and optional metadata into aWebResponse.
-
Method Details
-
map
Maps a generic response object to aWebResponse. If the input is already aMessage, its payload and metadata are extracted and reused.- Specified by:
mapin interfaceResponseMapper- Parameters:
response- the response object- Returns:
- a
WebResponserepresenting the mapped response
-
map
Maps a response and optional metadata into aWebResponse.- Specified by:
mapin interfaceResponseMapper- Parameters:
response- the raw response objectmetadata- associated metadata to include in the response- Returns:
- a
WebResponsewith payload and metadata
-