Unique identifier that can be used to register or retrieve a specific API.
Example: mendix.EditorsAPI, mycompany.MyFunkyAPI
Registers a message handler for messages sent to this entry point. Note that this handler will only receive messages sent from other entry points of the same component, and will never see its own messages. Handler will react only to messages that are sent after the handler is registered.
Function that will be called when a message is received.
Removes a registered message handler. The handler will no longer receive messages and will release any resources it was using.
The reference to the handler that was returned when the handler was registered.
True if the handler was successfully removed, false if no handler with the given reference was found.
Broadcasts a message to other entry points that have registered message handlers.
Message that will be sent to other entry points, can be any type.
OptionalonResponse: ResponseHandler<TResponseData>If provided, this function will be called for the first entry point that calls IMessagePassingApi.sendResponse with the messageId of the sent message. Note that this function will be called at most once, so if you are expecting multiple responses, you should register a message handler instead.
Sends a response to a message. It will invoke the onResponse callback that was passed to the sendMessage method.
ID of the message to which the response is being sent. ID is obtained from the MessageInfo object in handlers.
Response that will be sent back to the sender of the message.
Make sure that the type of the response matches the type expected by the onResponse callback.
True if the response was successfully sent, false if no message with ID was found or answer was already sent.
API for passing messages between different entry points of a component