All Known Implementing Classes:
DirectStrategy, GatewayStrategy, InClusterStrategy, PortForwardStrategy

public interface ConnectionStrategy
Strategy for discovering the HTTP base URL used to reach a sandbox. Mirrors the Python SDK's ConnectionStrategy.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    Release any resources held by this strategy (e.g. port-forward tunnels).
    Discover and return the base URL.
    default boolean
    Whether X-Sandbox-* router headers should be injected into requests.
  • Method Details

    • connect

      String connect() throws Exception
      Discover and return the base URL.
      Returns:
      the base URL (e.g. http://127.0.0.1:12345)
      Throws:
      Exception - if discovery fails
    • close

      default void close()
      Release any resources held by this strategy (e.g. port-forward tunnels).
    • shouldInjectRouterHeaders

      default boolean shouldInjectRouterHeaders()
      Whether X-Sandbox-* router headers should be injected into requests.
      Returns:
      true for router-based strategies; false for in-cluster direct