Examples of IKarafServerDelegate


Examples of org.fusesource.ide.server.karaf.core.server.IKarafServerDelegate

 
  public SshConnector(IServer server) {
    super();
    this.server = server;
    this.behaviorDelegate = (IControllableServerBehavior)server.loadAdapter(IControllableServerBehavior.class, new NullProgressMonitor());
    IKarafServerDelegate config = (IKarafServerDelegate)server.loadAdapter(IKarafServerDelegate.class, new NullProgressMonitor());
    this.host = server.getHost();
    this.port = config.getPortNumber();
    this.userName = config.getUserName();
    this.passwd = config.getPassword();
  }
View Full Code Here

Examples of org.fusesource.ide.server.karaf.core.server.IKarafServerDelegate

  private void populateModel() {
    IServerWorkingCopy workingCopy = getServerWorkingCopy();
    if (model != null && workingCopy != null) {
      // workCopy will be instance of ServerDelegate classs.
      // We need to get the params, so IFuseESBRuntime will be enough.
      IKarafServerDelegate karafServerWorkingCopy = (IKarafServerDelegate) workingCopy.loadAdapter(IKarafServerDelegate.class, new NullProgressMonitor());
      if (karafServerWorkingCopy != null) {
        model.setUserName(karafServerWorkingCopy.getUserName());
        model.setPassword(karafServerWorkingCopy.getPassword());
      }
      boolean readFromConfFile = false;
      IRuntime runtime = getRuntimeWorkingCopy();
      if (runtime != null){
        IKarafRuntime karafRuntime = (IKarafRuntime)runtime.loadAdapter(IKarafRuntime.class, null);
        if (karafRuntime != null ) {
          if("".equals(model.getKarafInstallDir()) || model.getKarafInstallDir() == null){
            model.setKarafInstallDir(karafRuntime.getLocation().toOSString());
          }
        }
      }
      if (!readFromConfFile && karafServerWorkingCopy != null) {
        model.setPortNumber(karafServerWorkingCopy.getPortNumber());
      }
    }
  }
View Full Code Here

Examples of org.fusesource.ide.server.karaf.core.server.IKarafServerDelegate

  public static final String ID = "org.fusesource.ide.jmx.karaf.connection.KarafConnectionProvider";
 
  @Override
  protected boolean belongsHere(IServer server) {
    IKarafServerDelegate del = (IKarafServerDelegate)server.loadAdapter(IKarafServerDelegate.class, new NullProgressMonitor());
    if( del != null ) {
      return true;
    }
    return false;
  }
View Full Code Here

Examples of org.fusesource.ide.server.karaf.core.server.IKarafServerDelegate

    run(runnable, prefs, false);
  }
 
  public void run(IJMXRunnable runnable, HashMap<String, String> prefs, boolean saveActiveConnection) throws JMXException {
    if (getServer().getAdapter(IKarafServerDelegate.class) != null) {
      IKarafServerDelegate kserver = (IKarafServerDelegate) getServer().getAdapter(IKarafServerDelegate.class);
      String user = kserver.getUserName();
      String pass = kserver.getPassword();
      run(server, runnable, user, pass, saveActiveConnection);     
    }
  }
View Full Code Here

Examples of org.fusesource.ide.server.karaf.core.server.IKarafServerDelegate

  }

  protected int findSSHPort(int defaultValue) {
    IServer s = getServer();
    if (s != null) {
      IKarafServerDelegate ksd = (IKarafServerDelegate)s.loadAdapter(IKarafServerDelegate.class, new NullProgressMonitor());
      if (ksd != null) {
        return ksd.getPortNumber();
      }
    }
    return defaultValue;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.