Class ElbV2Config


public class ElbV2Config extends AbstractServiceConfig<ElbV2Config.Builder>
Configuration for ELBv2 (Elastic Load Balancing v2)-specific container settings.

Instances are created via ElbV2Config.Builder:


 ElbV2Config config = ElbV2Config.builder()
     .listenerPort(8080)
     .build();
 
  • Method Details

    • builder

      public static ElbV2Config.Builder builder()
      Returns a new ElbV2Config.Builder for this configuration.
      Returns:
      a new builder
    • toBuilder

      public ElbV2Config.Builder toBuilder()
      Returns a new ElbV2Config.Builder for this configuration, initialized with the current values of this instance.
      Specified by:
      toBuilder in class AbstractServiceConfig<ElbV2Config.Builder>
      Returns:
      a new builder pre-populated with this configuration's values
    • isMock

      public boolean isMock()
      Returns whether load balancers are simulated without starting a real load balancer
      Returns:
      true if mock mode is enabled
    • getListenerPorts

      public List<Integer> getListenerPorts()
      Returns the pre-declared listener ports to be exposed on the container.
      Returns:
      immutable list of listener ports
    • applyExposedPortsToContainer

      public void applyExposedPortsToContainer(org.testcontainers.containers.Container<?> container)
      Description copied from class: AbstractServiceConfig
      Applies this service configuration to the given container by exposing the appropriate ports.
      Overrides:
      applyExposedPortsToContainer in class AbstractServiceConfig<ElbV2Config.Builder>
      Parameters:
      container - the container to configure
    • applyEnvVarsToContainer

      public void applyEnvVarsToContainer(org.testcontainers.containers.Container<?> container)
      Description copied from class: AbstractServiceConfig
      Applies this service configuration to the given container by setting the appropriate environment variables.
      Overrides:
      applyEnvVarsToContainer in class AbstractServiceConfig<ElbV2Config.Builder>
      Parameters:
      container - the container to configure