Interface EntityToMessageListTransformer<E>

Type Parameters:
E -
All Superinterfaces:
BiFunction<String,E,List<? extends Message<?>>>
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface EntityToMessageListTransformer<E> extends BiFunction<String,E,List<? extends Message<?>>>
Transforms an entity from e.g. a StateRepository into a list of messages.

The transformer is a BiFunction that will get the entity-id and the entity itself as an argument. The entity-id will most likely be used to generate one or more message-keys, while the entity will be used to generate the message payload.