Navigation
API > API/Runtime > API/Runtime/Messaging
Interface for message recipients.
Classes that implement this interface are able to receive messages from a message bus. A message recipient will receive a call to its IMessageReceiver.ReceiveMessage method for each message that was sent directly to it (via IMessageBus.Send) and for each published message (via IMessageBus.Publish) that it subscribed to (via IMessageBus.Subscribe).
This interface provides a rather low-level mechanism for receiving messages. Instead of implementing it, Most users will want to use an instance of see FMessageEndpoint, which provides a much more convenient way of sending and receiving messages.
| Name | IMessageReceiver |
| Type | class |
| Header File | /Engine/Source/Runtime/Messaging/Public/IMessageReceiver.h |
| Include Path | #include "IMessageReceiver.h" |
Syntax
class IMessageReceiver
Derived Classes
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~IMessageReceiver() |
Virtual destructor. | IMessageReceiver.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| Gets the recipient's name (for debugging purposes). | IMessageReceiver.h | ||
const FGuid & GetRecipientId () |
Gets the recipient's unique identifier (for debugging purposes). | IMessageReceiver.h | |
| Gets the name of the thread on which to receive messages. | IMessageReceiver.h | ||
bool IsLocal () |
Checks whether this recipient represents a local endpoint. | IMessageReceiver.h | |
bool IsRemote () |
Checks whether this recipient represents a remote endpoint. | IMessageReceiver.h | |
void ReceiveMessage
(
const TSharedRef< IMessageContext, ESPMode::ThreadSafe >& Context |
Handles the given message. | IMessageReceiver.h |
See Also
-
FMessageEndpoint