![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <IMessageReceiver.h>
Inheritance diagram for IMessageReceiver:Public Member Functions | |
| virtual FName | GetDebugName () const =0 |
| virtual const FGuid & | GetRecipientId () const =0 |
| virtual ENamedThreads::Type | GetRecipientThread () const =0 |
| virtual bool | IsLocal () const =0 |
| virtual void | ReceiveMessage (const TSharedRef< IMessageContext, ESPMode::ThreadSafe > &Context)=0 |
| bool | IsRemote () const |
| virtual | ~IMessageReceiver () |
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.
|
inlinevirtual |
Virtual destructor.
Gets the recipient's name (for debugging purposes).
Implemented in FMessageBridge, and FMessageEndpoint.
Gets the recipient's unique identifier (for debugging purposes).
Implemented in FMessageBridge, and FMessageEndpoint.
|
pure virtual |
Gets the name of the thread on which to receive messages.
If the recipient's ReceiveMessage() is thread-safe, return ThreadAny for best performance.
Implemented in FMessageBridge, and FMessageEndpoint.
Checks whether this recipient represents a local endpoint.
Local recipients are located in the current thread or process. Recipients located in other processes on the same machine or on remote machines are considered remote.
Implemented in FMessageBridge, and FMessageEndpoint.
|
inline |
Checks whether this recipient represents a remote endpoint.
Local recipients are located in the current thread or process. Recipients located in other processes on the same machine or on remote machines are considered remote.
|
pure virtual |
Handles the given message.
| Context | Will hold the context of the received message. |
Implemented in FMessageBridge, and FMessageEndpoint.