Package io.ebean.docker.container
Class ContainerFactory
- java.lang.Object
-
- io.ebean.docker.container.ContainerFactory
-
public class ContainerFactory extends Object
Creates containers from properties with the ability to start and stop them.
-
-
Constructor Summary
Constructors Constructor Description ContainerFactory(Properties properties)Create given properties and reading system and env properties for 'run with'.ContainerFactory(Properties properties, String runWith)Create given the properties and runWith.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ContainerConfigconfig(String platform)Return the config for a given platform.Containercontainer(String platform)Return the container for a given platform.voidstartContainers()Start all the containers.voidstartContainers(Consumer<String> logging)Start all the containers with a consumer for logging start descriptions.voidstopContainers()Stop all containers using the stopMode which defaults to also removing the containers.voidstopContainers(Consumer<String> logging)Stop all the containers with a consumer for logging stop descriptions.voidstopOnly()Stop all containers (without removing the containers).voidstopOnly(Consumer<String> logging)Stop all the containers (without remove) with a consumer for logging stop descriptions.
-
-
-
Constructor Detail
-
ContainerFactory
public ContainerFactory(Properties properties)
Create given properties and reading system and env properties for 'run with'.
-
ContainerFactory
public ContainerFactory(Properties properties, String runWith)
Create given the properties and runWith.- Parameters:
properties- The properties to configure the containersrunWith- Comma delimited string with container to run
-
-
Method Detail
-
startContainers
public void startContainers()
Start all the containers.
-
startContainers
public void startContainers(Consumer<String> logging)
Start all the containers with a consumer for logging start descriptions.
-
stopContainers
public void stopContainers()
Stop all containers using the stopMode which defaults to also removing the containers.
-
stopContainers
public void stopContainers(Consumer<String> logging)
Stop all the containers with a consumer for logging stop descriptions.
-
stopOnly
public void stopOnly()
Stop all containers (without removing the containers).
-
stopOnly
public void stopOnly(Consumer<String> logging)
Stop all the containers (without remove) with a consumer for logging stop descriptions.
-
config
public ContainerConfig config(String platform)
Return the config for a given platform.
-
-