code: public void configure(Object configuration) {
  
          if (!(configuration instanceof Properties) && !(configuration.toString() instanceof String))
              throw new IllegalArgumentException("Configuration for DAR must be of type Properties or String; "
                      + configuration.getClass().getName() + " was received");
  
          Properties properties = new Properties();
          if (configuration instanceof String) {
              try {
                  properties.load(new StringReader((String) configuration));
              } catch (IOException e) {
                  throw new IllegalArgumentException(e);
              }
          } else if (configuration instanceof Properties) {
              properties = (Properties) configuration;
          }
          try {
              defaultSipApplicationRouterInfos = this.defaultApplicationRouterParser.parse(properties);
          } catch (ParseException e1) {
              throw new IllegalArgumentException("Failed to parse the new DAR properties", e1);
          }
  
          String configFileLocation = defaultApplicationRouterParser.getDarConfigurationFileLocation();
  
          if (configFileLocation.startsWith("file:/")) {
              int i = 5;
              while (configFileLocation.charAt(i) == '/')
                  i++;
              configFileLocation = configFileLocation.substring(i - 1);
          } else {
              log.warn("Can not write persist DAR configuration to "
                      + configFileLocation
                      + ". Make sure you have write permissions and make sure it's a local file. NOTE THAT THE NEW DAR CONFIGURATION IS LOADED AND EFFECTIVE.");
              return;
          }
  
          if (configFileLocation == null || configFileLocation.length() < 1)
              throw new IllegalStateException("Configuration file name is empty.");
  
          File configFile = new File(configFileLocation);
          FileOutputStream fis = null;
          try {
              fis = new FileOutputStream(configFile);
              properties.store(fis, "Application Router Configuration");
          } catch (Exception e) {
              throw new IllegalStateException("Failed to store configuration file.", e);
          } finally {
              if (fis != null) {
                  try {
                      fis.close();
                  } catch (IOException e) {
                      log.error("fail to close the following file " + configFile.getAbsolutePath(), e);
                  }
              }
          }
  
          log.info("Stored DAR configuration in " + configFile.getAbsolutePath());
      }
docs: /*
  (non-Javadoc)
  
  @see org.mobicents.servlet.sip.router.ManageableApplicationRouter#configure(java.lang.Object)