Class ContainerFactory

java.lang.Object
io.ebean.test.containers.ContainerFactory

public class ContainerFactory extends Object
Creates containers from properties with the ability to start and stop them.
  • Constructor Details

    • 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 containers
      runWith - Comma delimited string with container to run
  • Method Details

    • 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.
    • container

      public Container container(String platform)
      Return the container for a given platform.