Interface Serializer<T>

Type Parameters:
T - the type to be serialized
All Superinterfaces:
InputTypeTranslator<byte[],T>, OutputTypeTranslator<T,byte[]>, TypeTranslator<T,byte[]>
All Known Implementing Classes:
AlertSerializer, ByteArraySerializer, GenericJsonSerializer, StatusMessageSerializer, StringSerializer, TraceRecordSerializer

public interface Serializer<T> extends TypeTranslator<T,byte[]>
A data serializer (so far for homogeneous streams, may require unique ids). Open: Do we have to cope with null values here?
Author:
Holger Eichelberger, SSE
  • Method Summary

    Modifier and Type
    Method
    Description
    clone(T origin)
    Creates a new value instance and copies the values from origin to the new instance.
    The type to be handled by this serializer.

    Methods inherited from interface de.iip_ecosphere.platform.transport.serialization.InputTypeTranslator

    from

    Methods inherited from interface de.iip_ecosphere.platform.transport.serialization.OutputTypeTranslator

    to
  • Method Details

    • clone

      T clone(T origin) throws IOException
      Creates a new value instance and copies the values from origin to the new instance. Use the SerializerRegistry to implement cloning of nested object values.
      Parameters:
      origin - the object to clone
      Returns:
      the cloned object
      Throws:
      IOException - in case that cloning/serialization operations fail
    • getType

      Class<T> getType()
      The type to be handled by this serializer.
      Returns:
      the type