Code example for Dictionary

Methods: getput

0
    config.setBundleLocation(null);
    Dictionary brokerProps = config.getProperties();
    if (brokerProps == null) {
      brokerProps = new Hashtable();
    } else { 
      wasEnabled = (Boolean) brokerProps.get("broker.enabled");
    } 
    brokerProps.put(BROKER_ENABLED, false);
    config.update(brokerProps);
  } 
 
  @Deactivate 
  protected void deactivate(Map<?, ?> props) throws Exception {
    Configuration config = configAdmin.getConfiguration(BROKER_PID, null);
    Dictionary listenerProps = config.getProperties();
    if (listenerProps == null) {
      listenerProps = new Hashtable();
    } 
    listenerProps.put(BROKER_ENABLED, wasEnabled);
    config.update(listenerProps);
Experience pair programming with AI  Get Codota for Java