HttpSerializers.@Deprecated
public final class HttpSerializationProviders
extends Object
HttpSerializationProviders.@Deprecated public static HttpSerializer<Map<String,List<String>>> formUrlEncodedSerializer()
HttpSerializers.formUrlEncodedSerializer().HttpSerializer that can serialize a key-values Maps
with StandardCharsets.UTF_8 Charset to urlencoded forms.HttpSerializer that could serialize key-value Map.@Deprecated public static HttpSerializer<Map<String,List<String>>> formUrlEncodedSerializer(Charset charset)
HttpSerializers.formUrlEncodedSerializer(Charset).HttpSerializer that can serialize key-values Maps with the specified Charset
to to urlencoded forms.charset - Charset for the key-value Map that will be serialized.HttpSerializer that could serialize from key-value Map.@Deprecated public static HttpSerializer<Map<String,List<String>>> formUrlEncodedSerializer(Charset charset, Consumer<HttpHeaders> addContentType)
HttpSerializers.formUrlEncodedSerializer(Charset).HttpSerializer that can serialize a key-values Maps with the specified Charset
to urlencoded forms.charset - Charset for the key-value Map that will be serialized.addContentType - A Consumer that adds relevant headers to the passed HttpHeaders matching
the serialized payload. Typically, this involves adding a HttpHeaderNames.CONTENT_TYPE header.HttpSerializer that could serialize from key-value Map.@Deprecated public static HttpDeserializer<Map<String,List<String>>> formUrlEncodedDeserializer()
HttpSerializers.formUrlEncodedSerializer().HttpDeserializer that can deserialize key-values Maps
with StandardCharsets.UTF_8 from urlencoded forms.HttpDeserializer that could deserialize a key-values Map.@Deprecated public static HttpDeserializer<Map<String,List<String>>> formUrlEncodedDeserializer(Charset charset)
HttpSerializers.formUrlEncodedSerializer(Charset).HttpDeserializer that can deserialize key-values Maps
with StandardCharsets.UTF_8 from urlencoded forms.charset - Charset for the key-value Map that will be deserialized.
deserialized payload. If the validation fails, then deserialization will fail with SerializationExceptionHttpDeserializer that could deserialize a key-value Map.@Deprecated public static HttpDeserializer<Map<String,List<String>>> formUrlEncodedDeserializer(Charset charset, Predicate<HttpHeaders> checkContentType)
HttpSerializers.formUrlEncodedSerializer(Charset).HttpDeserializer that can deserialize key-values Maps
with StandardCharsets.UTF_8 from urlencoded forms.charset - Charset for the key-value Map that will be deserialized.checkContentType - Checks the HttpHeaders to see if a compatible encoding is found.
deserialized payload. If the validation fails, then deserialization will fail with SerializationExceptionHttpDeserializer that could deserialize a key-value Map.@Deprecated public static HttpSerializer<String> textSerializer()
HttpSerializers.textSerializerUtf8() for aggregated. For streaming, use one of the
following:
HttpSerializer that could serialize String.@Deprecated public static HttpSerializer<String> textSerializer(Charset charset)
HttpSerializers.textSerializer(Charset) for aggregated. For streaming, use one of the
following:
charset - Charset for the String that will be serialized.HttpSerializer that could serialize from String.@Deprecated public static HttpSerializer<String> textSerializer(Charset charset, Consumer<HttpHeaders> addContentType)
HttpSerializers.textSerializer(Charset) for aggregated. For streaming, use one of the
following:
charset - Charset for the String that will be serialized.addContentType - A Consumer that adds relevant headers to the passed HttpHeaders matching
the serialized payload. Typically, this involves adding a HttpHeaderNames.CONTENT_TYPE header.HttpSerializer that could serialize from String.@Deprecated public static HttpDeserializer<String> textDeserializer()
HttpSerializers.textSerializerUtf8() for aggregated. For streaming, use one of the
following:
HttpSerializers.appSerializerUtf8FixLen()HttpSerializers.appSerializerAsciiVarLen()StreamingHttpRequest.toRequest()) and use
HttpSerializers.textSerializer(Charset) if your payload is textHttpSerializers.streamingSerializer(StreamingSerializerDeserializer, Consumer, Predicate)
targeted at your HttpHeaderNames.CONTENT_TYPEHttpDeserializer that could deserialize String.@Deprecated public static HttpDeserializer<String> textDeserializer(Charset charset)
HttpSerializers.textSerializer(Charset) for aggregated. For streaming, use one of the
following:
HttpSerializers.appSerializerUtf8FixLen()HttpSerializers.appSerializerAsciiVarLen()StreamingHttpRequest.toRequest()) and use
HttpSerializers.textSerializer(Charset) if your payload is textHttpSerializers.streamingSerializer(StreamingSerializerDeserializer, Consumer, Predicate)
targeted at your HttpHeaderNames.CONTENT_TYPEcharset - Charset for the String that will be deserialized.HttpDeserializer that could deserialize String.@Deprecated public static HttpDeserializer<String> textDeserializer(Charset charset, Predicate<HttpHeaders> checkContentType)
HttpSerializers.textSerializer(Charset) for aggregated. For streaming, use one of the
following:
HttpSerializers.appSerializerUtf8FixLen()HttpSerializers.appSerializerAsciiVarLen()StreamingHttpRequest.toRequest()) and use
HttpSerializers.textSerializer(Charset) if your payload is textHttpSerializers.streamingSerializer(StreamingSerializerDeserializer, Consumer, Predicate)
targeted at your HttpHeaderNames.CONTENT_TYPEcharset - Charset for the String that will be deserialized.checkContentType - A Predicate that validates the passed HttpHeaders as expected for the
deserialized payload. If the validation fails, then deserialization will fail with SerializationExceptionHttpDeserializer that could deserialize String.@Deprecated public static HttpSerializationProvider jsonSerializer(Serializer serializer)
HttpSerializers.jsonSerializer(SerializerDeserializer) or
HttpSerializers.jsonStreamingSerializer(StreamingSerializerDeserializer).HttpSerializationProvider that could serialize/deserialize to/from JSON using the passed
Serializer. For serialization, the returned HttpSerializationProvider adds a
HttpHeaderNames.CONTENT_TYPE header with value HttpHeaderValues.APPLICATION_JSON.
For deserialization, it expects a HttpHeaderNames.CONTENT_TYPE header with value
HttpHeaderValues.APPLICATION_JSON. If the expected header is not present, then deserialization will fail
with SerializationException.serializer - Serializer that has the capability of serializing/deserializing to/from JSON.HttpSerializationProvider that has the capability of serializing/deserializing to/from JSON.@Deprecated public static HttpSerializationProvider jsonSerializer(SerializationProvider serializationProvider)
HttpSerializers.jsonSerializer(SerializerDeserializer) or
HttpSerializers.jsonStreamingSerializer(StreamingSerializerDeserializer).HttpSerializationProvider that could serialize/deserialize to/from JSON using the passed
SerializationProvider. For serialization, the returned HttpSerializationProvider adds a
HttpHeaderNames.CONTENT_TYPE header with value HttpHeaderValues.APPLICATION_JSON.
For deserialization, it expects a HttpHeaderNames.CONTENT_TYPE header with value
HttpHeaderValues.APPLICATION_JSON. If the expected header is not present, then deserialization will fail
with SerializationException.serializationProvider - SerializationProvider that has the capability of serializing/deserializing
to/from JSON.HttpSerializationProvider that has the capability of serializing/deserializing to/from JSON.@Deprecated public static HttpSerializationProvider serializationProvider(Serializer serializer, Consumer<HttpHeaders> addContentType, Predicate<HttpHeaders> checkContentType)
HttpSerializers, HttpSerializer2, HttpDeserializer2,
HttpStreamingSerializer, and HttpStreamingDeserializer.HttpSerializationProvider that could serialize/deserialize to/from the desired content-type
using the passed Serializer.
For serialization, the returned HttpSerializationProvider
would update HttpHeaders appropriately to indicate the content-type using the passed
addContentType.
For deserialization, it would validate headers as specified by the passed
checkContentType predicate. If the validation fails, then deserialization will fail with
SerializationException.
serializer - Serializer that has the capability of serializing/deserializing to/from a desired
content-type.addContentType - A Consumer that adds relevant headers to the passed HttpHeaders matching
the serialized payload. Typically, this involves adding a HttpHeaderNames.CONTENT_TYPE header.checkContentType - A Predicate that validates the passed HttpHeaders as expected for the
deserialized payload. If the validation fails, then deserialization will fail with SerializationExceptionHttpSerializationProvider that has the capability of serializing/deserializing to/from a desired
content-type.@Deprecated public static HttpSerializationProvider serializationProvider(SerializationProvider serializationProvider, Consumer<HttpHeaders> addContentType, Predicate<HttpHeaders> checkContentType)
HttpSerializers, HttpSerializer2, HttpDeserializer2,
HttpStreamingSerializer, and HttpStreamingDeserializer.HttpSerializationProvider that could serialize/deserialize to/from the desired content-type
using the passed SerializationProvider.
For serialization, the returned HttpSerializationProvider
would update HttpHeaders appropriately to indicate the content-type using the passed
addContentType.
For deserialization, it would validate headers as specified by the passed
checkContentType predicate. If the validation fails, then deserialization will fail with
SerializationException.
serializationProvider - SerializationProvider that has the capability of serializing/deserializing
to/from a desired content-type.addContentType - A Consumer that adds relevant headers to the passed HttpHeaders matching
the serialized payload. Typically, this involves adding a HttpHeaderNames.CONTENT_TYPE header.checkContentType - A Predicate that validates the passed HttpHeaders as expected for the
deserialized payload. If the validation fails, then deserialization will fail with
SerializationException.HttpSerializationProvider that has the capability of serializing/deserializing to/from a desired
content-type.