Package org.apache.juneau.httppart
Interface HttpPartSerializerSession
- All Known Implementing Classes:
BaseHttpPartSerializerSession
,OpenApiSerializerSession
,SimplePartSerializerSession
,UonSerializerSession
,UrlEncodingSerializerSession
public interface HttpPartSerializerSession
Session object that lives for the duration of a single use of
HttpPartSerializer
.
Notes:
- This class is not thread safe and is typically discarded after one use.
See Also:
-
Method Summary
Modifier and TypeMethodDescriptionserialize
(HttpPartType type, HttpPartSchema schema, Object value) Converts the specified value to a string that can be used as an HTTP header value, query parameter value, form-data parameter, or URI path variable.
-
Method Details
-
serialize
String serialize(HttpPartType type, HttpPartSchema schema, Object value) throws SerializeException, SchemaValidationException Converts the specified value to a string that can be used as an HTTP header value, query parameter value, form-data parameter, or URI path variable.Returned values should NOT be URL-encoded.
- Parameters:
type
- The category of value being serialized.schema
- Schema information about the part.
May benull .
Not all part serializers use the schema information.value
- The value being serialized.- Returns:
- The serialized value.
- Throws:
SerializeException
- If a problem occurred while trying to parse the input.SchemaValidationException
- If the output fails schema validation.
-