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

Interface for message contexts. 更多...

#include <IMessageContext.h>

+ 类 IMessageContext 继承关系图:

Public 成员函数

virtual const TMap< FName, FString > & GetAnnotations () const =0
 Gets the optional message annotations. 更多...
 
virtual TSharedPtr< IMessageAttachment, ESPMode::ThreadSafe > GetAttachment () const =0
 Gets the message attachment, if present. 更多...
 
virtual const FDateTime & GetExpiration () const =0
 Gets the date and time at which the message expires. 更多...
 
virtual EMessageFlags GetFlags () const =0
 Gets the scope to which the message was sent. 更多...
 
virtual const FMessageAddress & GetForwarder () const =0
 Gets the forwarder's address. 更多...
 
virtual const void * GetMessage () const =0
 Gets the message data. 更多...
 
FName GetMessageType () const
 Gets the name of the message type. 更多...
 
virtual const TWeakObjectPtr< UScriptStruct > & GetMessageTypeInfo () const =0
 Gets the message's type information. 更多...
 
virtual TSharedPtr< IMessageContext, ESPMode::ThreadSafe > GetOriginalContext () const =0
 Returns the original message context in case the message was forwarded. 更多...
 
virtual const TArray< FMessageAddress > & GetRecipients () const =0
 Gets the list of message recipients. 更多...
 
virtual EMessageScope GetScope () const =0
 Gets the scope to which the message was sent. 更多...
 
virtual const FMessageAddress & GetSender () const =0
 Gets the sender's address. 更多...
 
virtual ENamedThreads::Type GetSenderThread () const =0
 Gets the name of the thread from which the message was sent. 更多...
 
virtual const FDateTime & GetTimeForwarded () const =0
 Gets the time at which the message was forwarded. 更多...
 
virtual const FDateTime & GetTimeSent () const =0
 Gets the time at which the message was sent. 更多...
 
bool IsForwarded () const
 Checks whether this is a forwarded message. 更多...
 
bool IsValid () const
 Checks whether this context is valid. 更多...
 
virtual ~IMessageContext ()
 Virtual destructor.
 

详细描述

Interface for message contexts.

Messages are delivered inside message contexts, which store the message itself plus additional data associated with the message. Recipients of a message are usually interested in data that describes the message, such as its origin or when it expires. They may also be interested in optional out-of-band binary data that is attached to the message.

The sender's address (IMessageContext.GetSender) is often needed to send a reply message to a message sender, i.e. in response to a published message. The message attachment (IMessageContext.GetAttachment) is an optional bundle of binary bulk data that is transferred independently from the message itself and allows for transferring larger amounts of data that would otherwise clog up the messaging system.

In case a message was forwarded by another endpoint, the context of the original sender can be accessed using the IMessageContext.GetOriginalContext method.

参见
IMessageAttachment

成员函数说明

◆ GetAnnotations()

virtual const TMap< FName, FString > & IMessageContext::GetAnnotations ( ) const
pure virtual

Gets the optional message annotations.

返回
Message header collection.

◆ GetAttachment()

virtual TSharedPtr< IMessageAttachment, ESPMode::ThreadSafe > IMessageContext::GetAttachment ( ) const
pure virtual

Gets the message attachment, if present.

返回
A pointer to the message attachment, or nullptr if no attachment is present.

◆ GetExpiration()

virtual const FDateTime & IMessageContext::GetExpiration ( ) const
pure virtual

Gets the date and time at which the message expires.

返回
Expiration time.

◆ GetFlags()

virtual EMessageFlags IMessageContext::GetFlags ( ) const
pure virtual

Gets the scope to which the message was sent.

返回
The message scope.

◆ GetForwarder()

virtual const FMessageAddress & IMessageContext::GetForwarder ( ) const
pure virtual

Gets the forwarder's address.

注解
Identical to GetSender if the message wasn't forwarded.
返回
Forwarder address.
参见
GetSender, GetRecipients, GetSenderThread

◆ GetMessage()

virtual const void * IMessageContext::GetMessage ( ) const
pure virtual

Gets the message data.

返回
A pointer to the message data.
参见
GetAttachment, GetMessageType, GetMessageTypeInfo

◆ GetMessageType()

FName IMessageContext::GetMessageType ( ) const
inline

Gets the name of the message type.

返回
Message type name.
参见
GetMessage, GetMessageTypeInfo

◆ GetMessageTypeInfo()

virtual const TWeakObjectPtr< UScriptStruct > & IMessageContext::GetMessageTypeInfo ( ) const
pure virtual

Gets the message's type information.

返回
Message type information.
参见
GetMessage, GetMessageType

◆ GetOriginalContext()

virtual TSharedPtr< IMessageContext, ESPMode::ThreadSafe > IMessageContext::GetOriginalContext ( ) const
pure virtual

Returns the original message context in case the message was forwarded.

返回
The original message context, or nullptr if the message wasn't forwarded.

◆ GetRecipients()

virtual const TArray< FMessageAddress > & IMessageContext::GetRecipients ( ) const
pure virtual

Gets the list of message recipients.

返回
Message recipients.
参见
GetSender

◆ GetScope()

virtual EMessageScope IMessageContext::GetScope ( ) const
pure virtual

Gets the scope to which the message was sent.

返回
The message scope.

◆ GetSender()

virtual const FMessageAddress & IMessageContext::GetSender ( ) const
pure virtual

Gets the sender's address.

返回
Sender address.
参见
GetRecipients, GetSenderThread

◆ GetSenderThread()

virtual ENamedThreads::Type IMessageContext::GetSenderThread ( ) const
pure virtual

Gets the name of the thread from which the message was sent.

返回
Sender threat name.
参见
GetSender

◆ GetTimeForwarded()

virtual const FDateTime & IMessageContext::GetTimeForwarded ( ) const
pure virtual

Gets the time at which the message was forwarded.

返回
Time forwarded.
参见
GetTimeSent, IsForwarded

◆ GetTimeSent()

virtual const FDateTime & IMessageContext::GetTimeSent ( ) const
pure virtual

Gets the time at which the message was sent.

返回
Time sent.
参见
GetTimeForwarded

◆ IsForwarded()

bool IMessageContext::IsForwarded ( ) const
inline

Checks whether this is a forwarded message.

返回
true if the message was forwarded, false otherwise.
参见
GetOriginalContext, GetTimeForwarded, IsValid

◆ IsValid()

bool IMessageContext::IsValid ( ) const
inline

Checks whether this context is valid.

返回
true if the context is valid, false otherwise.
参见
IsForwarded

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