Interface for message recipients. 更多...
#include <IMessageReceiver.h>
类 IMessageReceiver 继承关系图:Public 成员函数 | |
| virtual FName | GetDebugName () const =0 |
| Gets the recipient's name (for debugging purposes). 更多... | |
| virtual const FGuid & | GetRecipientId () const =0 |
| Gets the recipient's unique identifier (for debugging purposes). 更多... | |
| virtual ENamedThreads::Type | GetRecipientThread () const =0 |
| Gets the name of the thread on which to receive messages. 更多... | |
| virtual bool | IsLocal () const =0 |
| Checks whether this recipient represents a local endpoint. 更多... | |
| bool | IsRemote () const |
| Checks whether this recipient represents a remote endpoint. 更多... | |
| virtual void | ReceiveMessage (const TSharedRef< IMessageContext, ESPMode::ThreadSafe > &Context)=0 |
| Handles the given message. 更多... | |
| virtual | ~IMessageReceiver () |
| Virtual destructor. | |
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.
|
pure virtual |
|
pure virtual |
Gets the recipient's unique identifier (for debugging purposes).
在 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.
在 FMessageEndpoint 内被实现.
|
pure virtual |
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.
在 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. |
在 FMessageEndpoint 内被实现.