Interface SafeCopyProperty


  • public interface SafeCopyProperty
    An interface that allows safe copy (deep clone) of property value object when creating copy of Exchange objects. Classes implementing this interface can be set as key value pair on exchange object via ExtendedExchange.setSafeCopyProperty(String, SafeCopyProperty). When exchange object is copied it will invoke safeCopy() method on properties set using ExtendedExchange.setSafeCopyProperty(String, SafeCopyProperty). This allows the property value object to return a copy object to be set on the target exchange object instead of the original value object. This protects the properties from unintended mutation when using parallelProcessing in Multicast or RecipientList EIP
    • Method Detail

      • safeCopy

        SafeCopyProperty safeCopy()
        Implementations should implement this method to return a deep copy of the object which can be mutated independently of the original object.
        Returns:
        copy object usually of the same class type which implements this interface