com.github.dockerjava.core.command
Class StopContainerCmdImpl

java.lang.Object
  extended by com.github.dockerjava.core.command.AbstrDockerCmd<StopContainerCmd,Void>
      extended by 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.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.github.dockerjava.api.command.StopContainerCmd
StopContainerCmd.Exec
 
Field Summary
 
Fields inherited from class com.github.dockerjava.core.command.AbstrDockerCmd
execution
 
Constructor Summary
StopContainerCmdImpl(StopContainerCmd.Exec exec, String containerId)
           
 
Method Summary
 Void exec()
           
 String getContainerId()
           
 int getTimeout()
           
 String toString()
           
 StopContainerCmd withContainerId(String containerId)
           
 StopContainerCmd withTimeout(int timeout)
           
 
Methods inherited from class com.github.dockerjava.core.command.AbstrDockerCmd
toDockerException
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StopContainerCmdImpl

public StopContainerCmdImpl(StopContainerCmd.Exec exec,
                            String containerId)
Method Detail

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.