Package com.zeroturnaround.liverebel.api

Examples of com.zeroturnaround.liverebel.api.CommandCenterFactory


    String password = props.getProperty("password", null);
    String token = props.getProperty("token", null);

    // configure and create instance of CommandCenter that is used to communicate with LiveRebel Command Center

    final CommandCenterFactory centerFactory = new CommandCenterFactory().setUrl(centerUrl, centerPort);
    // use authentication token if it is set
    if (token != null && token.trim().length() > 0) {
      log.info("Using authentication token '{}' to connect to LiveRebel Command Center running on {}", token, centerAddress);
      centerFactory.authenticate(token);
    }
    else {
      log.info("Didn't find authentication token from {} file - using userName='{}' and password='{}' to connect to LiveRebel Command Center running on {}",
          LR_CLI_PROPERTIES, userName, password, centerAddress);
      centerFactory.authenticate(userName, password);
    }
    return centerFactory.newCommandCenter();
  }
View Full Code Here

TOP

Related Classes of com.zeroturnaround.liverebel.api.CommandCenterFactory

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.