Package net.jmesnil.jmx.core.util

Examples of net.jmesnil.jmx.core.util.XMLMemento


    List<String> keys = new ArrayList<String>();
    keys.addAll(connections.keySet());
    Collections.sort(keys);
    DefaultConnectionWrapper wrapper;
    MBeanServerConnectionDescriptor descriptor;
    XMLMemento root = XMLMemento.createWriteRoot(CONNECTIONS);
    Iterator<String> i = keys.iterator();
    while(i.hasNext()) {
       wrapper = connections.get(i.next());
      if( wrapper != null ) {
        descriptor = wrapper.getDescriptor();
        if( descriptor != null ) {
          IMemento child = root.createChild(CONNECTION);
          child.putString(ID, descriptor.getID());
          child.putString(URL, descriptor.getURL());
          child.putString(USERNAME, descriptor.getUserName());
          child.putString(PASSWORD, descriptor.getPassword());
        }
      }
    }
    root.saveToFile(filename);
  }
View Full Code Here

TOP

Related Classes of net.jmesnil.jmx.core.util.XMLMemento

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.