Search in sources :

Example 1 with CloudSdkAppEngineVersions

use of com.google.cloud.tools.appengine.cloudsdk.CloudSdkAppEngineVersions in project google-cloud-intellij by GoogleCloudPlatform.

the class AppEngineStop method stop.

/**
 * Stops the given module / version of an App Engine application.
 */
public void stop(@NotNull String module, @NotNull String version, @NotNull ProcessStartListener startListener) {
    ProcessOutputLineListener outputListener = new ProcessOutputLineListener() {

        @Override
        public void onOutputLine(String line) {
            loggingHandler.print(line + "\n");
        }
    };
    ProcessExitListener stopExitListener = new StopExitListener();
    CloudSdk sdk = helper.createSdk(loggingHandler, startListener, outputListener, outputListener, stopExitListener);
    DefaultVersionsSelectionConfiguration configuration = new DefaultVersionsSelectionConfiguration();
    configuration.setVersions(Collections.singletonList(version));
    configuration.setService(module);
    configuration.setProject(deploymentConfiguration.getCloudProjectName());
    CloudSdkAppEngineVersions command = new CloudSdkAppEngineVersions(sdk);
    command.stop(configuration);
}
Also used : ProcessExitListener(com.google.cloud.tools.appengine.cloudsdk.process.ProcessExitListener) DefaultVersionsSelectionConfiguration(com.google.cloud.tools.appengine.api.versions.DefaultVersionsSelectionConfiguration) CloudSdkAppEngineVersions(com.google.cloud.tools.appengine.cloudsdk.CloudSdkAppEngineVersions) ProcessOutputLineListener(com.google.cloud.tools.appengine.cloudsdk.process.ProcessOutputLineListener) CloudSdk(com.google.cloud.tools.appengine.cloudsdk.CloudSdk)

Aggregations

DefaultVersionsSelectionConfiguration (com.google.cloud.tools.appengine.api.versions.DefaultVersionsSelectionConfiguration)1 CloudSdk (com.google.cloud.tools.appengine.cloudsdk.CloudSdk)1 CloudSdkAppEngineVersions (com.google.cloud.tools.appengine.cloudsdk.CloudSdkAppEngineVersions)1 ProcessExitListener (com.google.cloud.tools.appengine.cloudsdk.process.ProcessExitListener)1 ProcessOutputLineListener (com.google.cloud.tools.appengine.cloudsdk.process.ProcessOutputLineListener)1