test_class.declarator: SESSION_TIMEOUT_KEY = "session"
test_class.modifier: private static final
test_class.original_string: private static final String SESSION_TIMEOUT_KEY = "session";
test_class.type: String
test_class.var_name: SESSION_TIMEOUT_KEY
test_class.declarator: DEFAULT_NAMESPACE = "dubbo"
test_class.modifier: private static final
test_class.original_string: private static final String DEFAULT_NAMESPACE = "dubbo";
test_class.type: String
test_class.var_name: DEFAULT_NAMESPACE
test_class.declarator: apolloDynamicConfiguration
test_class.modifier: private static
test_class.original_string: private static ApolloDynamicConfiguration apolloDynamicConfiguration;
test_class.type: ApolloDynamicConfiguration
test_class.var_name: apolloDynamicConfiguration
test_class.declarator: url
test_class.modifier: private static
test_class.original_string: private static URL url;
test_class.type: URL
test_class.var_name: url
test_class.declarator: embeddedApollo = new EmbeddedApollo()
test_class.modifier: @ClassRule
      public static
test_class.original_string: @ClassRule
      public static EmbeddedApollo embeddedApollo = new EmbeddedApollo();
test_class.type: EmbeddedApollo
test_class.var_name: embeddedApollo
test_class.file: dubbo-configcenter/dubbo-configcenter-apollo/src/test/java/org/apache/dubbo/configcenter/support/apollo/ApolloDynamicConfigurationTest.java
test_class.identifier: ApolloDynamicConfigurationTest
test_case.body: @Test
      public void testGetRule() {
          String mockKey = "mockKey1";
          String mockValue = String.valueOf(new Random().nextInt());
          putMockRuleData(mockKey, mockValue, DEFAULT_NAMESPACE);
          apolloDynamicConfiguration = new ApolloDynamicConfiguration(url);
          assertEquals(mockValue, apolloDynamicConfiguration.getConfig(mockKey, DEFAULT_NAMESPACE, 3000L));
  
          mockKey = "notExistKey";
          assertNull(apolloDynamicConfiguration.getConfig(mockKey, DEFAULT_NAMESPACE, 3000L));
      }
test_case.class_method_signature: ApolloDynamicConfigurationTest.testGetRule()
test_case.full_signature: @Test public void testGetRule()
test_case.identifier: testGetRule
test_case.invocations: valueOf nextInt putMockRuleData assertEquals getConfig assertNull getConfig
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetRule()
focal_class.declarator: logger = LoggerFactory.getLogger(ApolloDynamicConfiguration.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger logger = LoggerFactory.getLogger(ApolloDynamicConfiguration.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: APOLLO_ENV_KEY = "env"
focal_class.modifier: private static final
focal_class.original_string: private static final String APOLLO_ENV_KEY = "env";
focal_class.type: String
focal_class.var_name: APOLLO_ENV_KEY
focal_class.declarator: APOLLO_ADDR_KEY = "apollo.meta"
focal_class.modifier: private static final
focal_class.original_string: private static final String APOLLO_ADDR_KEY = "apollo.meta";
focal_class.type: String
focal_class.var_name: APOLLO_ADDR_KEY
focal_class.declarator: APOLLO_CLUSTER_KEY = "apollo.cluster"
focal_class.modifier: private static final
focal_class.original_string: private static final String APOLLO_CLUSTER_KEY = "apollo.cluster";
focal_class.type: String
focal_class.var_name: APOLLO_CLUSTER_KEY
focal_class.declarator: APOLLO_PROTOCOL_PREFIX = "http://"
focal_class.modifier: private static final
focal_class.original_string: private static final String APOLLO_PROTOCOL_PREFIX = "http://";
focal_class.type: String
focal_class.var_name: APOLLO_PROTOCOL_PREFIX
focal_class.declarator: APOLLO_APPLICATION_KEY = "application"
focal_class.modifier: private static final
focal_class.original_string: private static final String APOLLO_APPLICATION_KEY = "application";
focal_class.type: String
focal_class.var_name: APOLLO_APPLICATION_KEY
focal_class.declarator: APOLLO_APPID_KEY = "app.id"
focal_class.modifier: private static final
focal_class.original_string: private static final String APOLLO_APPID_KEY = "app.id";
focal_class.type: String
focal_class.var_name: APOLLO_APPID_KEY
focal_class.declarator: url
focal_class.modifier: private
focal_class.original_string: private URL url;
focal_class.type: URL
focal_class.var_name: url
focal_class.declarator: dubboConfig
focal_class.modifier: private
focal_class.original_string: private Config dubboConfig;
focal_class.type: Config
focal_class.var_name: dubboConfig
focal_class.declarator: dubboConfigFile
focal_class.modifier: private
focal_class.original_string: private ConfigFile dubboConfigFile;
focal_class.type: ConfigFile
focal_class.var_name: dubboConfigFile
focal_class.declarator: listeners = new ConcurrentHashMap<>()
focal_class.modifier: private
focal_class.original_string: private ConcurrentMap<String, ApolloListener> listeners = new ConcurrentHashMap<>();
focal_class.type: ConcurrentMap<String, ApolloListener>
focal_class.var_name: listeners
focal_class.file: dubbo-configcenter/dubbo-configcenter-apollo/src/main/java/org/apache/dubbo/configcenter/support/apollo/ApolloDynamicConfiguration.java
focal_class.identifier: ApolloDynamicConfiguration
focal_class.interfaces: implements DynamicConfiguration
focal_class.class_method_signature: ApolloDynamicConfiguration.ApolloDynamicConfiguration(URL url)
focal_class.full_signature:   ApolloDynamicConfiguration(URL url)
focal_class.identifier: ApolloDynamicConfiguration
focal_class.parameters: (URL url)
focal_class.signature:  ApolloDynamicConfiguration(URL url)
focal_class.class_method_signature: ApolloDynamicConfiguration.getAddressWithProtocolPrefix(URL url)
focal_class.full_signature: private String getAddressWithProtocolPrefix(URL url)
focal_class.identifier: getAddressWithProtocolPrefix
focal_class.modifiers: private
focal_class.parameters: (URL url)
focal_class.return: String
focal_class.signature: String getAddressWithProtocolPrefix(URL url)
focal_class.class_method_signature: ApolloDynamicConfiguration.addListener(String key, String group, ConfigurationListener listener)
focal_class.full_signature: @Override public void addListener(String key, String group, ConfigurationListener listener)
focal_class.identifier: addListener
focal_class.modifiers: @Override public
focal_class.parameters: (String key, String group, ConfigurationListener listener)
focal_class.return: void
focal_class.signature: void addListener(String key, String group, ConfigurationListener listener)
focal_class.class_method_signature: ApolloDynamicConfiguration.removeListener(String key, String group, ConfigurationListener listener)
focal_class.full_signature: @Override public void removeListener(String key, String group, ConfigurationListener listener)
focal_class.identifier: removeListener
focal_class.modifiers: @Override public
focal_class.parameters: (String key, String group, ConfigurationListener listener)
focal_class.return: void
focal_class.signature: void removeListener(String key, String group, ConfigurationListener listener)
focal_class.class_method_signature: ApolloDynamicConfiguration.getConfig(String key, String group, long timeout)
focal_class.full_signature: @Override public String getConfig(String key, String group, long timeout)
focal_class.identifier: getConfig
focal_class.modifiers: @Override public
focal_class.parameters: (String key, String group, long timeout)
focal_class.return: String
focal_class.signature: String getConfig(String key, String group, long timeout)
focal_class.class_method_signature: ApolloDynamicConfiguration.getProperties(String key, String group, long timeout)
focal_class.full_signature: @Override public String getProperties(String key, String group, long timeout)
focal_class.identifier: getProperties
focal_class.modifiers: @Override public
focal_class.parameters: (String key, String group, long timeout)
focal_class.return: String
focal_class.signature: String getProperties(String key, String group, long timeout)
focal_class.class_method_signature: ApolloDynamicConfiguration.getInternalProperty(String key)
focal_class.full_signature: @Override public String getInternalProperty(String key)
focal_class.identifier: getInternalProperty
focal_class.modifiers: @Override public
focal_class.parameters: (String key)
focal_class.return: String
focal_class.signature: String getInternalProperty(String key)
focal_class.class_method_signature: ApolloDynamicConfiguration.createTargetListener(String key, String group)
focal_class.full_signature: private ApolloListener createTargetListener(String key, String group)
focal_class.identifier: createTargetListener
focal_class.modifiers: private
focal_class.parameters: (String key, String group)
focal_class.return: ApolloListener
focal_class.signature: ApolloListener createTargetListener(String key, String group)
focal_method.body: @Override
      public String getConfig(String key, String group, long timeout) throws IllegalStateException {
          if (StringUtils.isNotEmpty(group)) {
              if (group.equals(url.getParameter(APPLICATION_KEY))) {
                  return ConfigService.getAppConfig().getProperty(key, null);
              } else {
                  return ConfigService.getConfig(group).getProperty(key, null);
              }
          }
          return dubboConfig.getProperty(key, null);
      }
focal_method.class_method_signature: ApolloDynamicConfiguration.getConfig(String key, String group, long timeout)
focal_method.full_signature: @Override public String getConfig(String key, String group, long timeout)
focal_method.identifier: getConfig
focal_method.invocations: isNotEmpty equals getParameter getProperty getAppConfig getProperty getConfig getProperty
focal_method.modifiers: @Override public
focal_method.parameters: (String key, String group, long timeout)
focal_method.return: String
focal_method.signature: String getConfig(String key, String group, long timeout)