Interface InstanceSerializer<T>

All Known Implementing Classes:
JsonInstanceSerializer

public interface InstanceSerializer<T>
Injectable serializer for service instances
  • Method Summary

    Modifier and Type
    Method
    Description
    deserialize(byte[] bytes)
    Deserialize a byte array into an instance
    byte[]
    Serialize an instance into bytes
  • Method Details

    • serialize

      byte[] serialize(ServiceInstance<T> instance) throws Exception
      Serialize an instance into bytes
      Parameters:
      instance - the instance
      Returns:
      byte array representing the instance
      Throws:
      Exception - any errors
    • deserialize

      ServiceInstance<T> deserialize(byte[] bytes) throws Exception
      Deserialize a byte array into an instance
      Parameters:
      bytes - the bytes
      Returns:
      service instance
      Throws:
      Exception - any errors