Examples of CloudApplication


Examples of org.cloudfoundry.client.lib.domain.CloudApplication

      throws InterruptedException {
    long initialInterval = CloudOperationsConstants.SHORT_INTERVAL;
    Thread.sleep(initialInterval);
    long timeLeft = CloudOperationsConstants.DEPLOYMENT_TIMEOUT - initialInterval;
    while (timeLeft > 0) {
      CloudApplication deploymentDetails = client.getApplication(deploymentId);
      if (isApplicationReady(deploymentDetails)) {
        return true;
      }
      Thread.sleep(CloudOperationsConstants.ONE_SECOND_INTERVAL);
      timeLeft -= CloudOperationsConstants.ONE_SECOND_INTERVAL;
View Full Code Here

Examples of org.cloudfoundry.client.lib.domain.CloudApplication

  private CloudApplication getDeployedCloudApplication(CloudFoundryOperations client, String applicationId,
      IProgressMonitor monitor) {
    long timeLeft = CloudOperationsConstants.UPLOAD_TIMEOUT;
    while (timeLeft > 0) {
      CloudApplication application = client.getApplication(applicationId);
      if (applicationId.equals(application.getName())) {
        return application;
      }
      try {
        Thread.sleep(CloudOperationsConstants.SHORT_INTERVAL);
      }
View Full Code Here

Examples of org.cloudfoundry.client.lib.domain.CloudApplication

        return null;
      }

      // Check if a cloud application exists (i.e., it is deployed) before
      // determining if it is deployed in debug mode
      CloudApplication cloudApplication = cloudModule.getApplication();

      if (cloudApplication != null) {
        return DebugModeType.getDebugModeType(cloudApplication.getDebug());
      }

    }
    catch (CoreException e) {
      CloudFoundryPlugin.logError(e);
View Full Code Here

Examples of org.cloudfoundry.client.lib.domain.CloudApplication

   */
  protected boolean internalUpdateAppStats(CloudFoundryApplicationModule appModule, IProgressMonitor monitor)
      throws CoreException {

    // Update the CloudApplication in the cloud module.
    CloudApplication application = getApplication(appModule.getDeployedApplicationName(), monitor);
    appModule.setCloudApplication(application);

    if (application == null) {
      throw CloudErrorUtil.toCoreException(Messages.ERROR_NO_CLOUD_APPLICATION_FOUND);
    }
View Full Code Here

Examples of org.cloudfoundry.client.lib.domain.CloudApplication

          continue;
        }

        // Now process the deployed application, and re-categorise it if
        // necessary (i.e. whether it's external or not)
        CloudApplication actualApplication = deployedApplications.remove(cloudModule
            .getDeployedApplicationName());

        // Update the cloud module mapping to the cloud application,
        // such that the cloud module
        // has the latest cloud application reference.
View Full Code Here

Examples of org.cloudfoundry.client.lib.domain.CloudApplication

                  // Call AddServicesToApplicationAction and RemoveServicesFromApplicationAction,
                  // which will deal with the binding and unbinding of the service. In addition
                  // these actions refresh the Application and Services editor after the update
                  boolean isBoundToServiceAfter = curr.getBoundToServiceAfter();
                  if (isBoundToServiceAfter != curr.getBoundToServiceBefore()){
                    CloudApplication cloudApp = applicationsToProcess.get(i).getCloudApplication();
                    CloudFoundryApplicationModule module = server.getExistingCloudModule(cloudApp.getName());
                    if(isBoundToServiceAfter){             
                      ModifyServicesForApplicationAction bindService =
                          new AddServicesToApplicationAction(structuredSelection,
                              module,
                              server.getBehaviour(),
View Full Code Here

Examples of org.cloudfoundry.client.lib.domain.CloudApplication

        for (int i=0;i<len;i++){
          TableItem tableItem = table.getItem(i);
          if (tableItem != null){
            Object objCloudApplication = tableItem.getData();
            if (objCloudApplication instanceof CloudApplication){
              CloudApplication cloudApp = (CloudApplication) objCloudApplication;
              List<String> serviceList = cloudApp.getServices();
             
              tableItem.setChecked(serviceList.contains(serviceName));
              ApplicationToService applicationToService =
                  new ApplicationToService(cloudApp,serviceList.contains(serviceName));

              applicationToServiceMapping.put(cloudApp.getName(), applicationToService);
            }
          }
        }
      }
    }
View Full Code Here

Examples of org.cloudfoundry.client.lib.domain.CloudApplication

    public String getColumnText(Object element, int columnIndex) {
      String result = null;
      TableColumn column = viewer.getTable().getColumn(columnIndex);
      if (column != null) {
       
        CloudApplication app = (CloudApplication) element;
        result = app.getName();
      }
      return result;
    }
View Full Code Here

Examples of org.cloudfoundry.client.lib.domain.CloudApplication

    this.cloudServer = cloudServer;
  }

  protected CloudApplication getExistingCloudApplication(IProgressMonitor monitor) {

    CloudApplication existingApp = appModule.getApplication();
    if (existingApp == null) {
      try {
        existingApp = cloudServer.getBehaviour()
            .getApplication(appModule.getDeployedApplicationName(), monitor);
      }
View Full Code Here

Examples of org.cloudfoundry.client.lib.domain.CloudApplication

    refreshAndReenableDeploymentButtons(appModule);
    // refreshApplicationDeploymentButtons(appModule);

    mappedURIsLink.setEnabled(state == IServer.STATE_STARTED);

    CloudApplication cloudApplication = appModule.getApplication();

    instanceSpinner.setEnabled(cloudApplication != null);
    instancesViewer.getTable().setEnabled(cloudApplication != null);

    instancesViewer.setInput(null);

    memoryText.setEnabled(cloudApplication != null);
    if (cloudApplication != null) {
      int appMemory = appModule.getApplication().getMemory();

      if (appMemory > 0) {
        memoryText.setText(appMemory + ""); //$NON-NLS-1$
      }
    }

    List<String> currentURIs = null;
    if (cloudApplication != null) {
      currentURIs = cloudApplication.getUris();

      ApplicationStats applicationStats = appModule.getApplicationStats();
      InstancesInfo instancesInfo = appModule.getInstancesInfo();
      if (applicationStats != null) {
        List<InstanceStats> statss = applicationStats.getRecords();
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.