@Beta public class DefaultMessageDelegator extends Object implements MessageDelegator
A generic message in the context of the SAP Cloud Platform Enterprise Messaging contains an event type and the content of the message.
Constructor and Description |
---|
DefaultMessageDelegator() |
Modifier and Type | Method and Description |
---|---|
DefaultMessageDelegator |
addListener(MessageListener<? extends Message> listener)
Add a custom, type-safe listener to react on messages sent from the SAP Cloud Platform Enterprise Messaging
service.
|
void |
notifyListeners(Message message)
Method to be called with the received message.
|
@Nonnull public DefaultMessageDelegator addListener(@Nonnull MessageListener<? extends Message> listener)
addListener
in interface MessageDelegator
listener
- The listener implementation to add.DefaultMessageDelegator
for a fluent API.public void notifyListeners(@Nonnull Message message)
This will call all listeners that registered for the specified message.
notifyListeners
in interface MessageDelegator
message
- The VDM message to pass on.Copyright © 2020 SAP SE. All rights reserved.