engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 所有成员列表
IMessageReceiver类 参考abstract

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.

参见
FMessageEndpoint, IMessageBus, IMessageSender

成员函数说明

◆ GetDebugName()

virtual FName IMessageReceiver::GetDebugName ( ) const
pure virtual

Gets the recipient's name (for debugging purposes).

返回
The debug name.
参见
GetRecipientId, GetRecipientThread

在 FMessageEndpoint 内被实现.

◆ GetRecipientId()

virtual const FGuid & IMessageReceiver::GetRecipientId ( ) const
pure virtual

Gets the recipient's unique identifier (for debugging purposes).

返回
The recipient's identifier.
参见
GetDebugName, GetRecipientThread

在 FMessageEndpoint 内被实现.

◆ GetRecipientThread()

virtual ENamedThreads::Type IMessageReceiver::GetRecipientThread ( ) const
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.

返回
Name of the receiving thread.
参见
GetDebugName, GetRecipientId

在 FMessageEndpoint 内被实现.

◆ IsLocal()

virtual bool IMessageReceiver::IsLocal ( ) const
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.

返回
true if this recipient is local, false otherwise.
参见
IsRemote

在 FMessageEndpoint 内被实现.

◆ IsRemote()

bool IMessageReceiver::IsRemote ( ) const
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.

返回
true if this recipient is remote, false otherwise.
参见
IsLocal

◆ ReceiveMessage()

virtual void IMessageReceiver::ReceiveMessage ( const TSharedRef< IMessageContext, ESPMode::ThreadSafe > &  Context)
pure virtual

Handles the given message.

参数
ContextWill hold the context of the received message.

在 FMessageEndpoint 内被实现.


该类的文档由以下文件生成: