![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <MessageEndpointBuilder.h>
Implements a message endpoint builder.
|
inline |
Creates and initializes a new builder using the default message bus.
WARNING: This constructor must be called from the Game thread.
| InName | The endpoint's name (for debugging purposes). |
| InBus | The message bus to attach the endpoint to. |
|
inline |
Creates and initializes a new builder using the specified message bus.
| InName | The endpoint's name (for debugging purposes). |
| InBus | The message bus to attach the endpoint to. |
|
inline |
Builds the message endpoint as configured.
|
inline |
Adds a message handler for the given type of messages (via raw function pointers).
It is legal to configure multiple handlers for the same message type. Each handler will be executed when a message of the specified type is received.
This overload is used to register raw class member functions.
| HandlerType | The type of the object handling the messages. |
| MessageType | The type of messages to handle. |
| Handler | The class handling the messages. |
| HandlerFunc | The class function handling the messages. |
|
inline |
Adds a message handler for the given type of messages (via TFunction object).
It is legal to configure multiple handlers for the same message type. Each handler will be executed when a message of the specified type is received.
This overload is used to register functions that are compatible with TFunction function objects, such as global and static functions, as well as lambdas.
| MessageType | The type of messages to handle. |
| Function | The function object handling the messages. |
|
inline |
|
inline |
Implicit conversion operator to build the message endpoint as configured.
|
inline |
Configures the endpoint to receive messages on any thread.
By default, the builder initializes the message endpoint to receive on the current thread. Use this method to receive on any available thread instead.
ThreadAny is the fastest way to receive messages. It should be used if the receiving code is completely thread-safe and if it is sufficiently fast. ThreadAny MUST NOT be used if the receiving code is not thread-safe. It also SHOULD NOT be used if the code includes time consuming operations, because it will block the message router, causing no other messages to be delivered in the meantime.
|
inline |
Configured the endpoint to receive messages on a specific thread.
By default, the builder initializes the message endpoint to receive on the current thread. Use this method to receive on a different thread instead.
Also see the additional notes for ReceivingOnAnyThread().
| NamedThread | The name of the thread to receive messages on. |
|
inline |
Disables the endpoint.
|
inline |
Adds a message handler for the given type of messages (via TFunction object).
It is legal to configure multiple handlers for the same message type. Each handler will be executed when a message of the specified type is received.
This overload is used to register functions that are compatible with TFunction function objects, such as global and static functions, as well as lambdas.
| MessageType | The type of messages to handle. |
| Function | The function object handling the messages. |
|
inline |
Adds a message handler for the given type of messages (via raw function pointers).
It is legal to configure multiple handlers for the same message type. Each handler will be executed when a message of the specified type is received.
This overload is used to register raw class member functions.
| HandlerType | The type of the object handling the messages. |
| MessageType | The type of messages to handle. |
| Handler | The class handling the messages. |
| HandlerFunc | The class function handling the messages. |
|
inline |
Registers a message handler with the endpoint.
It is legal to configure multiple handlers for the same message type. Each handler will be executed when a message of the specified type is received.
| Handler | The handler to add. |
|
inline |
Enables the endpoint's message inbox.
The inbox is disabled by default.