当前位置: 首页>>代码示例>>Java>>正文


Java ProgressMessage类代码示例

本文整理汇总了Java中com.spotify.docker.client.messages.ProgressMessage的典型用法代码示例。如果您正苦于以下问题:Java ProgressMessage类的具体用法?Java ProgressMessage怎么用?Java ProgressMessage使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ProgressMessage类属于com.spotify.docker.client.messages包,在下文中一共展示了ProgressMessage类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: progress

import com.spotify.docker.client.messages.ProgressMessage; //导入依赖的package包/类
@Override
public void progress(ProgressMessage message) throws DockerException {
  if (message.error() != null) {
    handleError(message.error());
  } else if (message.progressDetail() != null) {
    handleProgress(message.id(), message.status(), message.progress());
  } else if ((message.status() != null) || (message.stream() != null)) {
    handleGeneric(message.stream(), message.status());
  }

  String imageId = message.buildImageId();
  if (imageId != null) {
    builtImageId = imageId;
  }
}
 
开发者ID:spotify,项目名称:dockerfile-maven,代码行数:16,代码来源:LoggingProgressHandler.java

示例2: progress

import com.spotify.docker.client.messages.ProgressMessage; //导入依赖的package包/类
@Override
public void progress(ProgressMessage message) throws DockerException {
    // Error handling (taken from
    // com.spotify.docker.client.LoggingPullHandler)
    if (message.error() != null) {
        if (message.error().contains("404") || message.error().contains("not found")) {
            throw new ImageNotFoundException(image, message.toString());
        } else {
            throw new ImagePullFailedException(image, message.toString());
        }
    }

    processProgress(message);
}
 
开发者ID:hobbit-project,项目名称:platform,代码行数:15,代码来源:LoggingPullHandler.java

示例3: processProgress

import com.spotify.docker.client.messages.ProgressMessage; //导入依赖的package包/类
protected synchronized void processProgress(ProgressMessage message) {
    if (message.status().startsWith(SWARM_PULLING_STARTED_STATUS)) {
        ++pullStartCount;
        if (pullStartCount == 2) {
            LOGGER.info("Pulling image {}", image);
            pullingStartedLogged = true;
        }
        return;
    }

    if (!pullingStartedLogged) {
        if (message.status().startsWith(SINGLE_IMAGE_UP_TO_DATE_STATUS)) {
            LOGGER.info("Image {} is up to date und does not have to be pulled.", image);
        } else if (message.status().startsWith(SINGLE_DOWNLOADING_STATUS)) {
            LOGGER.info("Image {} is being pulled...", image);
            pullingStartedLogged = true;
        }
    } else {
        if (message.status().startsWith(SINGLE_PULLING_COMPLETE_STATUS)) {
            LOGGER.info("Pulled image {}.", image);
        } else if ((pullStartCount > 0) && (message.status().endsWith(SWARM_PULLING_STOPPED_STATUS))) {
            ++pullEndCount;
            if (pullStartCount == pullEndCount) {
                LOGGER.info("Pulled image {}", image);
            }
        }
    }
}
 
开发者ID:hobbit-project,项目名称:platform,代码行数:29,代码来源:LoggingPullHandler.java

示例4: logPullProgress

import com.spotify.docker.client.messages.ProgressMessage; //导入依赖的package包/类
protected void logPullProgress(Trace trace, ProgressMessage progress) {
	if (trace.isDebugEnabled()) {
		if ("downloading".equalsIgnoreCase(progress.status())) {
			//ommit donloading messages
			return;
		}
		trace.event(Level.DEBUG, "pull progress (id, status, progress, error)", progress.id(), progress.status(), progress.progress(), progress.error());
	}
}
 
开发者ID:petercipov,项目名称:mobi,代码行数:10,代码来源:SpotifyRxDocker.java


注:本文中的com.spotify.docker.client.messages.ProgressMessage类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。