Package net.jmesnil.jmx.core

Examples of net.jmesnil.jmx.core.IMemento


  protected void loadConnections() {
    String filename = JMXActivator.getDefault().getStateLocation().append(STORE_FILE).toOSString();
    HashMap<String, DefaultConnectionWrapper> map = new HashMap<String, DefaultConnectionWrapper>();
    if( new File(filename).exists()) {
      try {
        IMemento root = XMLMemento.loadMemento(filename);
        IMemento[] child = root.getChildren(CONNECTION);
        for( int i = 0; i < child.length; i++ ) {
          String id = child[i].getString(ID);
          String url = child[i].getString(URL);
          String username = child[i].getString(USERNAME);
          String password = child[i].getString(PASSWORD);
View Full Code Here


    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.IMemento

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.