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 ExchangeExtension.setSafeCopyProperty(String, SafeCopyProperty). When exchange object is copied it will invoke safeCopy() method on properties set using ExchangeExtension.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 Summary

    Modifier and Type
    Method
    Description
    Implementations should implement this method to return a deep copy of the object which can be mutated independently of the original object.
  • Method Details

    • 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