public class MessagingVdmConverter extends Object
MessageFactoryMapper
objects to pick the right MessageFactory
based on the message
type.
Multiple MessageFactoryMapper
objects can be configured, and each MessageFactoryMapper
can have
mappings for the same message type. In this case, the mapping of the most recently added MessageFactoryMapper
is used.Constructor and Description |
---|
MessagingVdmConverter(MessageFactoryMapper... messageFactoryMappers)
Creates a converter instance with the provided
MessageFactoryMapper instances. |
Modifier and Type | Method and Description |
---|---|
void |
addMessageFactoryMappers(MessageFactoryMapper... messageFactoryMappers)
Augment existing converter with provided
MessageFactoryMapper instances. |
Message |
fromMessage(String payload)
Translates plain string message payloads into Messaging VDM objects.
|
public MessagingVdmConverter(@Nonnull MessageFactoryMapper... messageFactoryMappers)
MessageFactoryMapper
instances. Note that in case of
duplicate mappings, the one from the right-most MessageFactoryMapper
will be used.messageFactoryMappers
- Mapping classes that implement the MessageFactoryMapper
interface and map message types to
message factory class names.public void addMessageFactoryMappers(@Nonnull MessageFactoryMapper... messageFactoryMappers)
MessageFactoryMapper
instances. Note that in case of duplicate
mappings, the one from the right-most MessageFactoryMapper
will be used.messageFactoryMappers
- Mapping classes that implement the MessageFactoryMapper
interface and map message types to
message factory class names.@Nonnull public Message fromMessage(@Nonnull String payload) throws MessagingException
payload
- The original message payload.MessagingException
- If there are problems converting the original message into a Messaging VDM object.Copyright © 2020 SAP SE. All rights reserved.