Class Stop
- java.lang.Object
-
- com.oracle.bedrock.runtime.docker.commands.AbstractDockerCommand<C>
-
- com.oracle.bedrock.runtime.docker.commands.CommandWithArgumentList<Stop>
-
- com.oracle.bedrock.runtime.docker.commands.Stop
-
- All Implemented Interfaces:
com.oracle.bedrock.runtime.MetaClass<com.oracle.bedrock.runtime.Application>
public class Stop extends CommandWithArgumentList<Stop>
A representation of the Docker stop command.Instances of
Stopare immutable, methods that add options and configuration to thisStopcommand return a new instance of aStopcommand with the modifications applied.Copyright (c) 2016. All Rights Reserved. Oracle Corporation.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.- Author:
- Jonathan Knight
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Stopcontainers(Object... names)Create aStopcommand to stop the containers with the specified names.static Stopcontainers(List<?> names)StoptimeUntilKill(int time)Set the number of seconds for Docker to wait for the container to stop before killing the container process.StopwithCommandArguments(List<com.oracle.bedrock.runtime.options.Argument> names, com.oracle.bedrock.runtime.options.Argument... args)Obtain a copy of thisCommandWithArgumentListwith the addition of the specified command argumentsArguments.protected StopwithoutCommandArguments(List<com.oracle.bedrock.runtime.options.Argument> names, com.oracle.bedrock.runtime.options.Argument... args)Obtain a copy of thisCommandWithArgumentListwithout the the specified command argumentsArguments.-
Methods inherited from class com.oracle.bedrock.runtime.docker.commands.CommandWithArgumentList
onLaunch, withCommandArguments, withoutCommandArguments
-
Methods inherited from class com.oracle.bedrock.runtime.docker.commands.AbstractDockerCommand
getCommandArguments, getImplementationClass, getTimeout, onLaunched, onLaunching, timeoutAfter, timeoutAfter
-
-
-
-
Method Detail
-
timeUntilKill
public Stop timeUntilKill(int time)
Set the number of seconds for Docker to wait for the container to stop before killing the container process.Equates to the
--timeargument.- Parameters:
time- the number of seconds for Docker to wait for the container to stop before killing the container process- Returns:
- a copy of this
Stopcommand with the--timeargument applied
-
withCommandArguments
public Stop withCommandArguments(List<com.oracle.bedrock.runtime.options.Argument> names, com.oracle.bedrock.runtime.options.Argument... args)
Description copied from class:CommandWithArgumentListObtain a copy of thisCommandWithArgumentListwith the addition of the specified command argumentsArguments.- Specified by:
withCommandArgumentsin classCommandWithArgumentList<Stop>- Parameters:
names- theListofArgumentsthat appear at the end of the command lineargs- the new command to add- Returns:
- a copy of this
CommandWithArgumentListwith the addition of the specified command argumentsArguments
-
withoutCommandArguments
protected Stop withoutCommandArguments(List<com.oracle.bedrock.runtime.options.Argument> names, com.oracle.bedrock.runtime.options.Argument... args)
Description copied from class:CommandWithArgumentListObtain a copy of thisCommandWithArgumentListwithout the the specified command argumentsArguments.- Specified by:
withoutCommandArgumentsin classCommandWithArgumentList<Stop>- Parameters:
names- theListofArgumentsthat appear at the end of the command lineargs- the new command to add- Returns:
- a copy of this
CommandWithArgumentListwithout the specified command argumentsArguments
-
containers
public static Stop containers(Object... names)
Create aStopcommand to stop the containers with the specified names.- Parameters:
names- the values that will resolve to the names of the containers to stop- Returns:
- a
Stopcommand to stop the containers with the specified names
-
-