com.github.dockerjava.core.command
Class StopContainerCmdImpl
java.lang.Object
com.github.dockerjava.core.command.AbstrDockerCmd<StopContainerCmd,Void>
com.github.dockerjava.core.command.StopContainerCmdImpl
- All Implemented Interfaces:
- DockerCmd<Void>, StopContainerCmd
public class StopContainerCmdImpl
- extends AbstrDockerCmd<StopContainerCmd,Void>
- implements StopContainerCmd
Stop a running container.
StopContainerCmdImpl
public StopContainerCmdImpl(StopContainerCmd.Exec exec,
String containerId)
getContainerId
public String getContainerId()
- Specified by:
getContainerId
in interface StopContainerCmd
getTimeout
public int getTimeout()
- Specified by:
getTimeout
in interface StopContainerCmd
withContainerId
public StopContainerCmd withContainerId(String containerId)
- Specified by:
withContainerId
in interface StopContainerCmd
withTimeout
public StopContainerCmd withTimeout(int timeout)
- Specified by:
withTimeout
in interface StopContainerCmd
toString
public String toString()
- Overrides:
toString
in class Object
exec
public Void exec()
throws NotFoundException,
NotModifiedException
- Specified by:
exec
in interface DockerCmd<Void>
- Specified by:
exec
in interface StopContainerCmd
- Overrides:
exec
in class AbstrDockerCmd<StopContainerCmd,Void>
- Throws:
NotFoundException
- No such container
NotModifiedException
- Container already stopped
Copyright © 2014. All rights reserved.