public interface HttpPartParser
The following default implementations are provided:
OpenApiParser
- Parts encoded in based on OpenAPI schema.
UonParser
- Parts encoded in UON notation.
SimplePartParser
- Parts encoded in plain text.
Implementations must include either a public no-args constructor or a public constructor that takes in a single
PropertyStore
object.
Modifier and Type | Interface and Description |
---|---|
static interface |
HttpPartParser.Null
Represent "no" part parser.
|
Modifier and Type | Method and Description |
---|---|
HttpPartParserSession |
createPartSession()
Creates a new no-argument parser session.
|
HttpPartParserSession |
createPartSession(ParserSessionArgs args)
Creates a new parser session.
|
<T> T |
parse(HttpPartSchema schema,
String in,
Class<T> toType)
Convenience method for creating a no-arg session and parsing a part of an unspecified part type.
|
<T> T |
parse(HttpPartSchema schema,
String in,
Type toType,
Type... toTypeArgs)
Convenience method for creating a no-arg session and parsing a part of an unspecified part type.
|
<T> T |
parse(HttpPartType partType,
HttpPartSchema schema,
String in,
Class<T> toType)
Convenience method for creating a no-arg session and parsing a part.
|
<T> T |
parse(HttpPartType partType,
HttpPartSchema schema,
String in,
Type toType,
Type... toTypeArgs)
Convenience method for creating a no-arg session and parsing a part.
|
HttpPartParserSession createPartSession(ParserSessionArgs args)
args
- The runtime arguments for the session.HttpPartParserSession createPartSession()
<T> T parse(HttpPartType partType, HttpPartSchema schema, String in, Class<T> toType) throws ParseException, SchemaValidationException
partType
- The category of value being parsed.schema
- Schema information about the part.
in
- The value being parsed.toType
- The POJO type to transform the input into.ParseException
- Malformed input encountered.SchemaValidationException
- If the input fails schema validation.<T> T parse(HttpPartType partType, HttpPartSchema schema, String in, Type toType, Type... toTypeArgs) throws ParseException, SchemaValidationException
partType
- The category of value being parsed.schema
- Schema information about the part.
in
- The value being parsed.toType
- The POJO type to transform the input into.toTypeArgs
- The POJO type arguments for Collections and Maps.ParseException
- Malformed input encountered.SchemaValidationException
- If the input fails schema validation.<T> T parse(HttpPartSchema schema, String in, Class<T> toType) throws ParseException, SchemaValidationException
schema
- Schema information about the part.
in
- The value being parsed.toType
- The POJO type to transform the input into.ParseException
- Malformed input encountered.SchemaValidationException
- If the input fails schema validation.<T> T parse(HttpPartSchema schema, String in, Type toType, Type... toTypeArgs) throws ParseException, SchemaValidationException
schema
- Schema information about the part.
in
- The value being parsed.toType
- The POJO type to transform the input into.toTypeArgs
- The POJO type arguments for Collections and Maps.ParseException
- Malformed input encountered.SchemaValidationException
- If the input fails schema validation.Copyright © 2016–2019 The Apache Software Foundation. All rights reserved.