// -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));