Converter

public interface Converter<WireType>

This class represents a converter interface for a wire format T. Implementations may support one or more domain types for (de-)serialization to T and back to a specific object type referenced through the typeinfo parameter.

Author

swrede

Parameters

<WireType> – the wire format to serialize on

Methods

deserialize

UserData deserialize(String wireSchema, WireType buffer)

Deserializes the data from the wire.

Parameters
  • wireSchema – wire schema of the serialized data

  • buffer – serialized data

Throws

ConversionException – error deserializing from the wire

Returns

deserialized data

getSignature

ConverterSignature getSignature()

Get signature for this converter.

Returns

the @See ConverterSignature of this converter instance

serialize

WireContents<WireType> serialize(Class<?> typeInfo, Object obj)

Serializes user data to a wire representation.

Parameters
  • typeInfo – Java class describing the type of the data to serialize

  • obj – data to serialize

Throws

ConversionException – error converting the data

Returns

serialized data and generated wire schema