Interface EventBusRegion
public interface EventBusRegion
Event Bus Management Domain
1. Manages subscriber information of other processes. 2. If multiple logic services are started within one process, the subscribers of these logic services will be added here.
- Since:
- 21
- Author:
- 渔民小镇
- date:
- 2023-12-24
-
Method Summary
Modifier and TypeMethodDescriptionvoidRegister a local EventBus instance in this region.getEventBus(int serverId) Get the EventBus instance for the given server ID.listLocalSubscriber(EventBusMessage eventBusMessage) Gets all subscribers in the current process based on the event messagelistRemoteEventServerMessage(EventBusMessage eventBusMessage) Get remote server messages that have subscribers for the given event.voidloadRemoteEventTopic(EventServerMessage eventServerMessage) Load event topics from a remote server.voidunloadRemoteTopic(EventServerMessage eventServerMessage) Unload event topics from a disconnected remote server.
-
Method Details
-
getEventBus
Get the EventBus instance for the given server ID.- Parameters:
serverId- the server ID- Returns:
- the EventBus instance associated with the server ID
-
addLocal
Register a local EventBus instance in this region.- Parameters:
eventBus- the EventBus instance to register
-
listLocalSubscriber
Gets all subscribers in the current process based on the event message- Parameters:
eventBusMessage- The event message- Returns:
- All subscribers in the current process
-
loadRemoteEventTopic
Load event topics from a remote server.- Parameters:
eventServerMessage- the remote server message containing topic information
-
unloadRemoteTopic
Unload event topics from a disconnected remote server.- Parameters:
eventServerMessage- the remote server message to unload
-
listRemoteEventServerMessage
Get remote server messages that have subscribers for the given event.- Parameters:
eventBusMessage- the event message to match against remote subscribers- Returns:
- set of remote server messages with matching subscribers
-