Class RelayConfig


  • public final class RelayConfig
    extends java.lang.Object
    Parses and maintains the RELAY2 configuration (in memory)
    Since:
    3.2
    Author:
    Bela Ban
    • Method Detail

      • parse

        public static void parse​(java.io.InputStream input,
                                 java.util.Map<java.lang.String,​RelayConfig.SiteConfig> map)
                          throws java.lang.Exception
        Parses site names and their configuration (e.g. "nyc" --> SiteConfig) into the map passed as argument
        Throws:
        java.lang.Exception
      • parse

        public static void parse​(XmlNode root,
                                 java.util.Map<java.lang.String,​RelayConfig.SiteConfig> map)
                          throws java.lang.Exception
        Throws:
        java.lang.Exception
      • parseSites

        protected static void parseSites​(java.util.Map<java.lang.String,​RelayConfig.SiteConfig> map,
                                         XmlNode root)
                                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • parseBridgesAndForwards

        protected static void parseBridgesAndForwards​(RelayConfig.SiteConfig site_config,
                                                      XmlNode root)
                                               throws java.lang.Exception
        Throws:
        java.lang.Exception
      • parseBridges

        protected static void parseBridges​(RelayConfig.SiteConfig site_config,
                                           XmlNode root)
                                    throws java.lang.Exception
        Throws:
        java.lang.Exception
      • parseForwards

        protected static void parseForwards​(RelayConfig.SiteConfig site_config,
                                            XmlNode root)
                                     throws java.lang.Exception
        Throws:
        java.lang.Exception
      • match

        protected static void match​(java.lang.String expected_name,
                                    java.lang.String name)
                             throws java.lang.Exception
        Throws:
        java.lang.Exception
      • main

        public static void main​(java.lang.String[] args)
                         throws java.lang.Exception
        Throws:
        java.lang.Exception