Package org.jaggeryjs.integration.common.clients

Examples of org.jaggeryjs.integration.common.clients.ServiceAdminClient


                "Service file uploading failed withing given deployment time"
        );
    }

    protected void deleteService(String serviceName) throws RemoteException {
        ServiceAdminClient adminServiceService =
                new ServiceAdminClient(backendURL, sessionCookie);
        if (ServiceDeploymentUtil.isFaultyService(backendURL,
                sessionCookie, serviceName)) {
            adminServiceService.deleteFaultyServiceByServiceName(serviceName);
        } else if (ServiceDeploymentUtil.isServiceExist(backendURL,
                sessionCookie, serviceName)) {
            adminServiceService.deleteService(new String[]{adminServiceService.getServiceGroup(serviceName)});
        }
        ServiceDeploymentUtil.isServiceDeleted(backendURL, sessionCookie, serviceName);
    }
View Full Code Here


                                        String serviceFilePath, int deploymentDelay)
            throws RemoteException, MalformedURLException, LoginAuthenticationExceptionException,
            ExceptionException {
        AARServiceUploaderClient adminServiceAARServiceUploader =
                new AARServiceUploaderClient(backEndUrl, sessionCookie);
        ServiceAdminClient adminServiceService = new ServiceAdminClient(backEndUrl, sessionCookie);
        if (adminServiceService.isServiceExists(serviceName)) {
            adminServiceService.deleteService(new String[]{serviceName});
            isServiceUnDeployed(backEndUrl, sessionCookie, serviceName, deploymentDelay);
        }
        adminServiceAARServiceUploader.uploadAARFile(serviceName + ".aar", serviceFilePath, "");
        Assert.assertTrue(isServiceDeployed(backEndUrl, sessionCookie, serviceName)
                , serviceName + " deployment failed in Application Server");
View Full Code Here

    public static void unDeployArrService(String backEndUrl, String sessionCookie,
                                          String serviceName,
                                          int deploymentDelay)
            throws RemoteException, MalformedURLException, LoginAuthenticationExceptionException,
            ExceptionException {
        ServiceAdminClient adminServiceService = new ServiceAdminClient(backEndUrl, sessionCookie);
        if (adminServiceService.isServiceExists(serviceName)) {
            adminServiceService.deleteService(new String[]{serviceName});
            isServiceUnDeployed(backEndUrl, sessionCookie, serviceName, deploymentDelay);
        }
    }
View Full Code Here

    public static boolean isServiceDeployed(String backEndUrl, String sessionCookie,
                                            String serviceName)
            throws RemoteException {
        log.info("waiting " + SERVICE_DEPLOYMENT_DELAY + " millis for Service deployment " + serviceName);
        boolean isServiceDeployed = false;
        ServiceAdminClient adminServiceService = new ServiceAdminClient(backEndUrl, sessionCookie);
        Calendar startTime = Calendar.getInstance();
        long time;
        while ((time = (Calendar.getInstance().getTimeInMillis() - startTime.getTimeInMillis())) < SERVICE_DEPLOYMENT_DELAY) {
            if (adminServiceService.isServiceExists(serviceName)) {
                isServiceDeployed = true;
                log.info(serviceName + " Service Deployed in " + time + " millis");
                break;
            }
            try {
View Full Code Here

    public static boolean isServiceUnDeployed(String backEndUrl, String sessionCookie,
                                              String serviceName,
                                              int deploymentDelay)
            throws RemoteException {
        log.info("waiting " + deploymentDelay + " millis for Service undeployment");
        ServiceAdminClient adminServiceService = new ServiceAdminClient(backEndUrl, sessionCookie);
        boolean isServiceDeleted = false;
        Calendar startTime = Calendar.getInstance();
        long time;
        while ((time = (Calendar.getInstance().getTimeInMillis() - startTime.getTimeInMillis())) < deploymentDelay) {
            if (!adminServiceService.isServiceExists(serviceName)) {
                isServiceDeleted = true;
                log.info(serviceName + " Service undeployed in " + time + " millis");
                break;
            }
            try {
View Full Code Here

    }

    public static boolean isServiceFaulty(String backEndUrl, String sessionCookie, String serviceName)
            throws RemoteException {
        boolean isServiceDeployed = false;
        ServiceAdminClient adminServiceService = new ServiceAdminClient(backEndUrl, sessionCookie);
        Calendar startTime = Calendar.getInstance();
        long time = startTime.getTimeInMillis() + SERVICE_DEPLOYMENT_DELAY;
        while (System.currentTimeMillis() < time) {
            if (adminServiceService.isServiceFaulty(serviceName)) {
                isServiceDeployed = true;
                break;
            }
            try {
                Thread.sleep(2000);
View Full Code Here

        return isServiceDeployed;
    }

    public static boolean isServiceExist(String backEndUrl, String sessionCookie, String serviceName)
            throws RemoteException {
        ServiceAdminClient adminServiceService = new ServiceAdminClient(backEndUrl, sessionCookie);
        return adminServiceService.isServiceExists(serviceName);
    }
View Full Code Here

        return adminServiceService.isServiceExists(serviceName);
    }

    public static boolean isFaultyService(String backEndUrl, String sessionCookie, String serviceName)
            throws RemoteException {
        ServiceAdminClient adminServiceService = new ServiceAdminClient(backEndUrl, sessionCookie);
        return adminServiceService.isServiceFaulty(serviceName);
    }
View Full Code Here

        return adminServiceService.isServiceFaulty(serviceName);
    }

    public static void deleteService(String backEndUrl, String sessionCookie, String serviceName)
            throws RemoteException {
        ServiceAdminClient adminServiceService = new ServiceAdminClient(backEndUrl, sessionCookie);
        if (isFaultyService(backEndUrl, sessionCookie, serviceName)) {
            adminServiceService.deleteFaultyServiceByServiceName(serviceName);
        } else if (isServiceExist(backEndUrl, sessionCookie, serviceName)) {
            adminServiceService.deleteService(new String[]{adminServiceService.getServiceGroup(serviceName)});
        }
    }
View Full Code Here

    }

    public static boolean isServiceDeleted(String backEndUrl, String sessionCookie, String serviceName)
            throws RemoteException {
        log.info("waiting " + SERVICE_DEPLOYMENT_DELAY + " millis for service un-deployment");
        ServiceAdminClient adminServiceService = new ServiceAdminClient(backEndUrl, sessionCookie);
        boolean isServiceDeleted = false;
        Calendar startTime = Calendar.getInstance();
        long time;
        while ((time = (Calendar.getInstance().getTimeInMillis() - startTime.getTimeInMillis())) < SERVICE_DEPLOYMENT_DELAY) {
            if (!adminServiceService.isServiceExists(serviceName)) {
                isServiceDeleted = true;
                log.info(serviceName + " Service un-deployed in " + time + " millis");
                break;
            }
            try {
View Full Code Here

TOP

Related Classes of org.jaggeryjs.integration.common.clients.ServiceAdminClient

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.