Class ProtocolsConfig

java.lang.Object
io.floci.testcontainers.config.ProtocolsConfig

public class ProtocolsConfig extends Object
Protocol-related configuration for the Floci server.

Instances are created via ProtocolsConfig.Builder:


 ProtocolsConfig config = ProtocolsConfig.builder()
     .strictClaiming(true)
     .build();
 
  • Method Details

    • builder

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

      public ProtocolsConfig.Builder toBuilder()
      Returns a new ProtocolsConfig.Builder for this configuration, initialized with the current values of this instance.
      Returns:
      a new builder pre-populated with this configuration's values
    • isStrictClaiming

      public boolean isStrictClaiming()
      Returns whether strict RPC protocol claiming is enabled.

      When enabled, requests carrying an RPC protocol signal that no supported wire protocol claims are rejected per the Smithy wire-protocol-selection guide (e.g. an unknown Smithy-Protocol header value, a recognized-but-unimplemented rpc-v2-json request, or an X-Amz-Target post with a foreign content type). When disabled such requests are only logged and pass through to JAX-RS matching.

      Returns:
      true if strict RPC protocol claiming is enabled
    • applyEnvVarsToContainer

      public void applyEnvVarsToContainer(org.testcontainers.containers.Container<?> container)
      Applies this protocols configuration to the given container by setting the appropriate environment variables.
      Parameters:
      container - the container to configure