Package org.apache.stratos.cli.exception

Examples of org.apache.stratos.cli.exception.CommandException


    // Initialize Service Stub
    try {
      initializeApplicationManagementStub(serverURL, username, password);
    } catch (AxisFault e) {
      System.out.println("Error connecting to the back-end");
      throw new CommandException(e);
    }
   
    try {
      if (validateLogin) {
        String tenantDomain = stub.getTenantDomain();
        if (logger.isDebugEnabled()) {
          logger.debug("Tenant Domain {}", tenantDomain);
        }
        return (tenantDomain != null);
      } else {
        // Just return true as we don't need to validate
        return true;
      }
    } catch (RemoteException e) {
      System.out.println("Authentication failed!");
      throw new CommandException(e);
    }
  }
View Full Code Here


    }
    if (logger.isErrorEnabled()) {
      logger.error(message);
    }
    System.out.println(message);
    throw new CommandException(message, e);
  }
View Full Code Here

      String message = CommandLineUtils.getMessage(key, args);
        if (logger.isErrorEnabled()) {
          logger.error(message);
        }
        System.out.println(message);
        throw new CommandException(message, e);
    }
View Full Code Here

            if (logger.isDebugEnabled()) {
                logger.debug("Initialized REST Client for user {}", username);
            }
        } catch (AxisFault e) {
            System.out.println("Error connecting to the back-end");
            throw new CommandException(e);
        }

        DefaultHttpClient httpClient = new DefaultHttpClient();
        try {
            if (validateLogin) {
View Full Code Here

        if (logger.isErrorEnabled()) {
            logger.error(message);
        }

        System.out.println(message);
        throw new CommandException(message, e);
    }
View Full Code Here

    // Initialize Service Stub
    try {
      initializeApplicationManagementStub(serverURL, username, password);
    } catch (AxisFault e) {
      System.out.println("Error connecting to the back-end");
      throw new CommandException(e);
    }
   
    try {
      if (validateLogin) {
        String tenantDomain = stub.getTenantDomain();
        if (logger.isDebugEnabled()) {
          logger.debug("Tenant Domain {}", tenantDomain);
        }
        return (tenantDomain != null);
      } else {
        // Just return true as we don't need to validate
        return true;
      }
    } catch (RemoteException e) {
      System.out.println("Authentication failed!");
      throw new CommandException(e);
    }
  }
View Full Code Here

    }
    if (logger.isErrorEnabled()) {
      logger.error(message);
    }
    System.out.println(message);
    throw new CommandException(message, e);
  }
View Full Code Here

      String message = CommandLineUtils.getMessage(key, args);
        if (logger.isErrorEnabled()) {
          logger.error(message);
        }
        System.out.println(message);
        throw new CommandException(message, e);
    }
View Full Code Here

TOP

Related Classes of org.apache.stratos.cli.exception.CommandException

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.