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


Java DisconnectFromNetworkCmd类代码示例

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


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

示例1: run

import com.github.dockerjava.api.command.DisconnectFromNetworkCmd; //导入依赖的package包/类
@Override
protected Void run() throws Exception {
  DisconnectFromNetworkCmd disconnectCmd = dockerClient.disconnectFromNetworkCmd();
  disconnectCmd.withNetworkId(networkName).withContainerId(containerId);

  try  {
    return disconnectCmd.exec();
  } catch (Exception e) {
    return null;
  } finally {
    disconnectCmd.close();
  }
}
 
开发者ID:Qorr,项目名称:Hvalspik,代码行数:14,代码来源:DisconnectNetworkCommand.java

示例2: createDisconnectFromNetworkCmdExec

import com.github.dockerjava.api.command.DisconnectFromNetworkCmd; //导入依赖的package包/类
@Override
public DisconnectFromNetworkCmd.Exec createDisconnectFromNetworkCmdExec() {

    return new DisconnectFromNetworkCmdExec(getBaseResource(), getDockerClientConfig());
}
 
开发者ID:docker-java,项目名称:docker-java,代码行数:6,代码来源:JerseyDockerCmdExecFactory.java

示例3: disconnectFromNetworkCmd

import com.github.dockerjava.api.command.DisconnectFromNetworkCmd; //导入依赖的package包/类
@Override
public DisconnectFromNetworkCmd disconnectFromNetworkCmd() {
    return new DisconnectFromNetworkCmdImpl(getDockerCmdExecFactory().createDisconnectFromNetworkCmdExec());
}
 
开发者ID:docker-java,项目名称:docker-java,代码行数:5,代码来源:DockerClientImpl.java

示例4: createDisconnectFromNetworkCmdExec

import com.github.dockerjava.api.command.DisconnectFromNetworkCmd; //导入依赖的package包/类
@Override
public DisconnectFromNetworkCmd.Exec createDisconnectFromNetworkCmdExec() {
    return new DisconnectFromNetworkCmdExec(getBaseResource(), getDockerClientConfig());
}
 
开发者ID:docker-java,项目名称:docker-java,代码行数:5,代码来源:AbstractDockerCmdExecFactory.java

示例5: DisconnectFromNetworkCmdImpl

import com.github.dockerjava.api.command.DisconnectFromNetworkCmd; //导入依赖的package包/类
public DisconnectFromNetworkCmdImpl(DockerCmdSyncExec<DisconnectFromNetworkCmd, Void> execution) {
    super(execution);
}
 
开发者ID:docker-java,项目名称:docker-java,代码行数:4,代码来源:DisconnectFromNetworkCmdImpl.java

示例6: withNetworkId

import com.github.dockerjava.api.command.DisconnectFromNetworkCmd; //导入依赖的package包/类
@Override
public DisconnectFromNetworkCmd withNetworkId(String networkId) {
    this.networkId = networkId;
    return this;
}
 
开发者ID:docker-java,项目名称:docker-java,代码行数:6,代码来源:DisconnectFromNetworkCmdImpl.java

示例7: withContainerId

import com.github.dockerjava.api.command.DisconnectFromNetworkCmd; //导入依赖的package包/类
@Override
public DisconnectFromNetworkCmd withContainerId(String containerId) {
    this.containerId = containerId;
    return this;
}
 
开发者ID:docker-java,项目名称:docker-java,代码行数:6,代码来源:DisconnectFromNetworkCmdImpl.java

示例8: withForce

import com.github.dockerjava.api.command.DisconnectFromNetworkCmd; //导入依赖的package包/类
@Override
public DisconnectFromNetworkCmd withForce(Boolean force) {
    this.force = force;
    return this;
}
 
开发者ID:docker-java,项目名称:docker-java,代码行数:6,代码来源:DisconnectFromNetworkCmdImpl.java

示例9: createDisconnectFromNetworkCmdExec

import com.github.dockerjava.api.command.DisconnectFromNetworkCmd; //导入依赖的package包/类
@Override
public DisconnectFromNetworkCmd.Exec createDisconnectFromNetworkCmdExec() {
    return delegate.createDisconnectFromNetworkCmdExec();
}
 
开发者ID:docker-java,项目名称:docker-java,代码行数:5,代码来源:TestDockerCmdExecFactory.java

示例10: execute

import com.github.dockerjava.api.command.DisconnectFromNetworkCmd; //导入依赖的package包/类
@Override
protected Void execute(DisconnectFromNetworkCmd command) {

    WebTarget webTarget = getBaseResource().path("/networks/" + command.getNetworkId() + "/disconnect");

    LOGGER.trace("POST: {}", webTarget);
    webTarget.request().post(entity(command, MediaType.APPLICATION_JSON));

    return null;
}
 
开发者ID:docker-java,项目名称:docker-java,代码行数:11,代码来源:DisconnectFromNetworkCmdExec.java

示例11: execute

import com.github.dockerjava.api.command.DisconnectFromNetworkCmd; //导入依赖的package包/类
@Override
protected Void execute(DisconnectFromNetworkCmd command) {

    WebTarget webTarget = getBaseResource().path("/networks/" + command.getNetworkId() + "/disconnect");

    LOGGER.trace("POST: {}", webTarget);
    webTarget.request().post(command);

    return null;
}
 
开发者ID:docker-java,项目名称:docker-java,代码行数:11,代码来源:DisconnectFromNetworkCmdExec.java

示例12: disconnectFromNetworkCmd

import com.github.dockerjava.api.command.DisconnectFromNetworkCmd; //导入依赖的package包/类
DisconnectFromNetworkCmd disconnectFromNetworkCmd(); 
开发者ID:docker-java,项目名称:docker-java,代码行数:2,代码来源:DockerClient.java


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