Class Kill

  • All Implemented Interfaces:
    com.oracle.bedrock.runtime.MetaClass<com.oracle.bedrock.runtime.Application>

    public class Kill
    extends CommandWithArgumentList<Kill>
    A representation of the Docker kill command.

    The main process inside the container will be sent SIGKILL, or any signal specified with option --signal.

    Instances of Kill are immutable, methods that add options and configuration to this Kill command return a new instance of a Kill command 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 Detail

      • signal

        public Kill signal​(String signal)
        Set the signal to send to the container process.

        Equates to the --signal argument.

        Parameters:
        signal - the signal to send container process
        Returns:
        a copy of this Kill command with the --time argument applied
      • withCommandArguments

        public Kill withCommandArguments​(List<com.oracle.bedrock.runtime.options.Argument> names,
                                         com.oracle.bedrock.runtime.options.Argument... args)
        Description copied from class: CommandWithArgumentList
        Obtain a copy of this CommandWithArgumentList with the addition of the specified command arguments Arguments.
        Specified by:
        withCommandArguments in class CommandWithArgumentList<Kill>
        Parameters:
        names - the List of Arguments that appear at the end of the command line
        args - the new command to add
        Returns:
        a copy of this CommandWithArgumentList with the addition of the specified command arguments Arguments
      • containers

        public static Kill containers​(Object... names)
        Create a Kill command to kill the containers with the specified names.
        Parameters:
        names - the values that will resolve to the names of the containers to kill
        Returns:
        a Kill command to kill the containers with the specified names
      • containers

        public static Kill containers​(List<?> names)
        Create a Kill command to kill the containers with the specified List names.
        Parameters:
        names - the List of values that will resolve to the names of the containers to kill
        Returns:
        a Kill command to kill the containers with the specified names