code: public static void addResource(String type, String id, String url){
          
          
          //add the new resource to the list of the managed resources
          logger.info("Adding the following new resource to the Data Collector Descriptor: {}, {}", type, id);
          try {
              resources.put(new InternalComponent(type,id), new URL(url));
          } catch (MalformedURLException e) {
              logger.error(e.getMessage(), e.getCause());
          }
          
          logger.info("Currently managed resources...");
          
          for(Resource r: _INSTANCE.getResources()){
              logger.info(r.getType() + " " + r.getId() + "\n");
          }
          
          // re-Build the DCDescriptor
          DCDescriptor dcDescriptor = new DCDescriptor();
  
          dcDescriptor.addMonitoredResources(_INSTANCE.getProvidedMetrics(), _INSTANCE.getResources());
          dcDescriptor.addResources(_INSTANCE.getResources());
  
          dcDescriptor
                  .setConfigSyncPeriod(CONFIG_SYNC_PERIOD != null ? CONFIG_SYNC_PERIOD
                          : DEFAULT_CONFIG_SYNC_PERIOD);
  
          dcDescriptor.setKeepAlive(KEEP_ALIVE != null ? KEEP_ALIVE
                  : (DEFAULT_CONFIG_SYNC_PERIOD + 15));
          
          logger.info("Setting the new DCDescriptor...");
          
          _INSTANCE.dcAgent.setDCDescriptor(dcDescriptor);
          
          //re-start the monitoring
          _INSTANCE.monitoringStarted = false;
          startMonitoring();
  
          
      }
docs: This method allow to add a new monitored resource to the Registry.
  @param type the Type of the new resource to be added.
  @param id the id of the new resource to be added.
  @param url the String representation of the url of the new resource to be added.