OptionaleventTopic: stringOptionaleventTopic: stringClears all handlers, listeners, interceptors, and request responders.
OptionaleventTopic: stringOptionaleventTopic: stringOptionaleventTopic: stringRegister a responder for synchronous request/response queries. Only the first registered responder for an event will be called.
The request event name
Function that returns the response value
OptionaleventTopic: stringOptional topic for topic-specific responders
Function to unregister the responder
OptionaleventTopic: stringSend a synchronous request and get an immediate response. Returns undefined if no responder is registered.
The request event name
Arguments to pass to the responder
The response value, or undefined if no responder
Send a synchronous request for a specific topic. Returns undefined if no responder is registered for that topic.
The request event name
The topic to target
Arguments to pass to the responder
The response value, or undefined if no responder
Central event bus for pub/sub communication and synchronous request/response queries.
The eventbus supports:
on(),once(),off(),broadcast(),broadcastForTopic()onRequest(),request(),requestForTopic()for synchronous queriesExample: Pub/Sub pattern
Example: Request/Response pattern