Package org.apache.juneau.httppart
Interface HttpPartParserSession
- All Known Implementing Classes:
BaseHttpPartParserSession
,OpenApiParserSession
,SimplePartParserSession
,UonParserSession
,UrlEncodingParserSession
public interface HttpPartParserSession
Session object that lives for the duration of a single use of
HttpPartParser
.
Notes:
- This class is not thread safe and is typically discarded after one use.
See Also:
-
Method Summary
Modifier and TypeMethodDescription<T> T
parse
(HttpPartType partType, HttpPartSchema schema, String in, ClassMeta<T> toType) Converts the specified input to the specified class type.
-
Method Details
-
parse
<T> T parse(HttpPartType partType, HttpPartSchema schema, String in, ClassMeta<T> toType) throws ParseException, SchemaValidationException Converts the specified input to the specified class type.- Type Parameters:
T
- The POJO type to transform the input into.- Parameters:
partType
- The part type being parsed.schema
- Schema information about the part.
May benull .
Not all part parsers use the schema information.in
- The input being parsed.toType
- The POJO type to transform the input into.- Returns:
- The parsed value.
- Throws:
ParseException
- Malformed input encountered.SchemaValidationException
- If the input or resulting HTTP part object fails schema validation.
-