Constructor and Description |
---|
HttpPart(String name,
HttpPartType partType,
HttpPartSchema schema,
HttpPartParser parser,
ParserSessionArgs args,
String part)
Constructor.
|
HttpPart(String name,
HttpPartType partType,
HttpPartSchema schema,
HttpPartSerializer serializer,
SerializerSessionArgs args,
Object part)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
String |
asString()
Returns the value of the part converted to a string.
|
<T> T |
asType(Class<T> c)
Returns the value of the part converted to a string.
|
String |
getName()
Returns the name of the part.
|
public HttpPart(String name, HttpPartType partType, HttpPartSchema schema, HttpPartSerializer serializer, SerializerSessionArgs args, Object part)
Used when the part is in POJO form and needs to be converted to a String.
name
- The HTTP part name (e.g. the header name).partType
- The HTTP part type.schema
- Schema information about the part.serializer
- The part serializer to use to serialize the part.args
- Session arguments to pass to the serializer.part
- The part POJO being serialized.public HttpPart(String name, HttpPartType partType, HttpPartSchema schema, HttpPartParser parser, ParserSessionArgs args, String part)
Used when the part is in String form and needs to be converted to a POJO.
name
- The HTTP part name (e.g. the header name).partType
- The HTTP part type.schema
- Schema information about the part.parser
- The part parser to use to parse the part.args
- Session arguments to pass to the parser.part
- The part string being parsed.public String asString() throws SchemaValidationException, SerializeException
SchemaValidationException
SerializeException
public <T> T asType(Class<T> c) throws SchemaValidationException, ParseException
c
- SchemaValidationException
ParseException
Copyright © 2018 Apache. All rights reserved.