catch (InterruptedException e) {
server.setModuleState(modules, IServer.STATE_STOPPED);
throw new OperationCanceledException();
}
AbstractAppStateTracker curTracker = CloudFoundryPlugin.getAppStateTracker(getServer()
.getServerType().getId(), cloudModule);
if (curTracker != null) {
curTracker.setServer(getServer());
curTracker.startTracking(cloudModule);
}
CloudFoundryPlugin.trace("Application " + deploymentName + " started"); //$NON-NLS-1$ //$NON-NLS-2$
CloudFoundryPlugin.getCallback().applicationStarted(getCloudFoundryServer(), cloudModule);
if (curTracker != null) {
// Wait for application to be ready or getting
// out of the starting state.
boolean isAppStarting = true;
while (isAppStarting && !progress.isCanceled()) {
if (curTracker.getApplicationState(cloudModule) == IServer.STATE_STARTING) {
try {
Thread.sleep(200);
}
catch (InterruptedException e) {
// Do nothing
}
}
else {
isAppStarting = false;
}
}
curTracker.stopTracking(cloudModule);
}
server.setModuleState(modules, IServer.STATE_STARTED);
return null;