Interface PayloadSubsectionExtractor<T extends PayloadSubsectionExtractor<T>>
- Type Parameters:
 T- the subsection extractor subclass
- All Known Implementing Classes:
 FieldPathPayloadSubsectionExtractor
public interface PayloadSubsectionExtractor<T extends PayloadSubsectionExtractor<T>>
Strategy interface for extracting a subsection of a payload.
- Since:
 - 1.2.0
 - Author:
 - Andy Wilkinson
 
- 
Method Summary
Modifier and TypeMethodDescriptionbyte[]extractSubsection(byte[] payload, @Nullable org.springframework.http.MediaType contentType) Extracts a subsection of the givenpayloadthat has the givencontentType.default byte[]extractSubsection(byte[] payload, @Nullable org.springframework.http.MediaType contentType, List<FieldDescriptor> descriptors) Extracts a subsection of the givenpayloadthat has the givencontentTypeand that is described by the givendescriptors.Returns an identifier for the subsection that this extractor will extract.withSubsectionId(String subsectionId) Returns an extractor with the givensubsectionId. 
- 
Method Details
- 
extractSubsection
byte[] extractSubsection(byte[] payload, @Nullable org.springframework.http.MediaType contentType) Extracts a subsection of the givenpayloadthat has the givencontentType.- Parameters:
 payload- the payloadcontentType- the content type of the payload- Returns:
 - the subsection of the payload
 
 - 
extractSubsection
default byte[] extractSubsection(byte[] payload, @Nullable org.springframework.http.MediaType contentType, List<FieldDescriptor> descriptors) Extracts a subsection of the givenpayloadthat has the givencontentTypeand that is described by the givendescriptors.- Parameters:
 payload- the payloadcontentType- the content type of the payloaddescriptors- descriptors that describe the payload- Returns:
 - the subsection of the payload
 - Since:
 - 2.0.4
 
 - 
getSubsectionId
String getSubsectionId()Returns an identifier for the subsection that this extractor will extract.- Returns:
 - the identifier
 
 - 
withSubsectionId
 
 -