Class ChannelRouter

java.lang.Object
com.iantapply.relay.core.ChannelRouter

public final class ChannelRouter extends Object
Maps logical destinations and node roles to namespaced transport channels.
  • Constructor Details

    • ChannelRouter

      public ChannelRouter(String namespace)
      Creates a router for one Redis namespace.
      Parameters:
      namespace - namespace shared by communicating Relay nodes
  • Method Details

    • channel

      public String channel(com.iantapply.relay.api.Destination destination)
      Resolves the publication channel for a destination.
      Parameters:
      destination - logical destination
      Returns:
      transport channel name
    • subscriptions

      public List<String> subscriptions(RelayConfig config)
      Returns the channels a node must consume for broadcasts, its platform, and its node ID.
      Parameters:
      config - local node configuration
      Returns:
      channel names to subscribe to