MessageT
- @Beta
public interface MessageListener<MessageT extends Message>
Represents a message listener which refers to a specific message type MessageT
.
For each message type there will be a specific message listener class which provides access to the respective
MessageTopic
and an instance of MessageFactory
.
Allows to specify logic to treat a received instance of MessageT
in the method onMessage
.
Modifier and Type | Method and Description |
---|---|
MessageFactory<MessageT> |
getMessageFactory()
Returns the instance of
MessageFactory this message type MessageT refers to. |
MessageTopic |
getTopic()
Returns the instance of
MessageTopic this message type MessageT refers to. |
void |
onMessage(MessageT message)
Called upon reception of one message of type
MessageT . |
@Nonnull MessageTopic getTopic()
MessageTopic
this message type MessageT
refers to.MessageTopic
@Nonnull MessageFactory<MessageT> getMessageFactory()
MessageFactory
this message type MessageT
refers to.MessageFactory
Copyright © 2019 SAP SE. All rights reserved.