Class EventServerMessage

java.lang.Object
com.iohao.net.framework.communication.eventbus.EventServerMessage

public final class EventServerMessage extends Object
Holds event topic information and server metadata for a logic server participating in the EventBus system. Used to track which topics a given server subscribes to, and whether it is local or remote.
Since:
21
Author:
渔民小镇
date:
2023-12-24
  • Constructor Details

    • EventServerMessage

      public EventServerMessage(Server server, Set<String> topics)
      Create an EventServerMessage for the given server and its subscribed topics.
      Parameters:
      server - the server descriptor
      topics - the set of event topic names the server subscribes to
  • Method Details

    • getTopics

      public Collection<String> getTopics()
      Get the event topic names this server subscribes to.
      Returns:
      collection of topic names
    • getName

      public String getName()
      Get the name of this server.
      Returns:
      the server name
    • getServerId

      public int getServerId()
      Get the server ID.
      Returns:
      the server ID
    • isRemote

      public boolean isRemote()
      Whether this server is in a remote process.
    • getServer

      public Server getServer()
      The server descriptor.