Class Relayer3


  • public class Relayer3
    extends Relayer
    Maintains bridges and routing table. Does the routing of outgoing messages and dispatches incoming messages to the right members.

    A Relayer cannot be reused once it is stopped, but a new Relayer instance must be created.

    Since:
    3.2
    Author:
    Bela Ban
    • Field Detail

      • bridges

        protected final java.util.Collection<Bridge> bridges
        The bridges which are used to connect to different sites
    • Constructor Detail

      • Relayer3

        public Relayer3​(RELAY relay,
                        Log log)
    • Method Detail

      • start

        public java.util.concurrent.CompletableFuture<Relayer> start​(RelayConfig.SiteConfig site_cfg,
                                                                     java.lang.String bridge_name,
                                                                     java.lang.String my_site_id)
                                                              throws java.lang.Throwable
        Creates all bridges from site_config and connects them (joining the bridge clusters)
        Parameters:
        site_cfg - The SiteConfiguration
        bridge_name - The name of the local bridge channel, prefixed with '_'.
        my_site_id - The ID of this site
        Throws:
        java.lang.Throwable
      • stop

        public void stop()
        Disconnects and destroys all bridges
        Specified by:
        stop in class Relayer
      • getBridgeView

        protected View getBridgeView​(java.lang.String cluster_name)
        Specified by:
        getBridgeView in class Relayer