Examples of HPIUsageException


Examples of org.hpi.exception.HPIUsageException

     
      // -server[-s]
      String serverParam = null;
      if (!GeneralsHelper.isStringOk(serverParam = consoleParameters.getValue("-server")) &&
          !GeneralsHelper.isStringOk(serverParam = consoleParameters.getValue("-s"))) {
        throw new HPIUsageException();
      }
     
      // -user[-u]
      String userParam = null;
      if (!GeneralsHelper.isStringOk(userParam = consoleParameters.getValue("-user")) &&
          !GeneralsHelper.isStringOk(userParam = consoleParameters.getValue("-u"))) {
        throw new HPIUsageException();
      }
     
      // -password[-p]
      String passwordParam = null;
      if (!GeneralsHelper.isStringOk(passwordParam = consoleParameters.getValue("-password")) &&
          !GeneralsHelper.isStringOk(passwordParam = consoleParameters.getValue("-p"))) {
        throw new HPIUsageException();
      }
     
      // create the client protocol instance and tries do login
      clientProtocol = connectClientProtocol(serverParam.trim());
      LoginResponse loginResponse = clientProtocol.doLogin(new User(userParam, passwordParam));
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.