Class ContainerCloseBehaviour
- java.lang.Object
-
- com.oracle.bedrock.runtime.docker.options.ContainerCloseBehaviour
-
- All Implemented Interfaces:
com.oracle.bedrock.Option,Consumer<DockerContainer>
public class ContainerCloseBehaviour extends Object implements com.oracle.bedrock.Option, Consumer<DockerContainer>
AnEnumandOptionrepresenting the types of behaviour to occur when closing aDockerContainer.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 voidaccept(DockerContainer container)Perform thisImageCloseBehaviour's action on the specifiedDockerContainer.static ContainerCloseBehaviournone()Do nothing when a container application is closed.static ContainerCloseBehaviourremove()Stop and remove the Docker container when a container application is closed.static ContainerCloseBehaviourstop()Stop the Docker container when a container application is closed.
-
-
-
Method Detail
-
accept
public void accept(DockerContainer container)
Perform thisImageCloseBehaviour's action on the specifiedDockerContainer.- Specified by:
acceptin interfaceConsumer<DockerContainer>- Parameters:
container- theDockerContainerto have the action performed on
-
none
public static ContainerCloseBehaviour none()
Do nothing when a container application is closed.- Returns:
- a
ContainerCloseBehaviour
-
stop
public static ContainerCloseBehaviour stop()
Stop the Docker container when a container application is closed.- Returns:
- a
ContainerCloseBehaviour
-
remove
@Default public static ContainerCloseBehaviour remove()
Stop and remove the Docker container when a container application is closed.- Returns:
- a
ContainerCloseBehaviour
-
-