Class MetadataConverter

java.lang.Object
org.axonframework.axonserver.connector.MetadataConverter

@Internal public final class MetadataConverter extends Object
Utility class to convert between Axon Server metadata values and a simple Map of String key-value pairs.

This class provides methods to convert a Map of String key-value pairs to a Map of Axon Server MetaDataValue objects and vice versa.

Since:
5.0.0
Author:
Steven van Beelen, Mitchell Herrijgers, Allard Buijze
  • Method Details

    • convertGrpcToMetadataValues

      @Nonnull public static Map<String,io.axoniq.axonserver.grpc.MetaDataValue> convertGrpcToMetadataValues(@Nonnull Map<String,String> source)
      Converts a Map of String key-value pairs to a Map of Axon Server MetaDataValue objects.
      Parameters:
      source - The source map containing String key-value pairs.
      Returns:
      A map where each value is converted to an Axon Server MetaDataValue.
    • convertMetadataValuesToGrpc

      @Nonnull public static Map<String,String> convertMetadataValuesToGrpc(@Nonnull Map<String,io.axoniq.axonserver.grpc.MetaDataValue> source)
      Converts a Map of Axon Server MetaDataValue objects to a Map of String key-value pairs.
      Parameters:
      source - The source map containing Axon Server MetaDataValue objects.
      Returns:
      A map where each value is converted to a String representation.