Interface InstanceSerializer<T>

  • All Known Implementing Classes:
    JsonInstanceSerializer

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

      • serialize

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

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