Class ServerContext.Builder

java.lang.Object
com.eqixiac.equinix.mcp.server.ServerContext.Builder
Enclosing class:
ServerContext

public static final class ServerContext.Builder extends Object
Builder for ServerContext.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • humanConfirmer

      public ServerContext.Builder humanConfirmer(HumanConfirmer confirmer)
      Replaces how ServerContext.confirmWithHuman(String) asks a person. Default: HumanConfirmer.elicitation(), an MCP form elicitation over the bound exchange.
      Parameters:
      confirmer - the confirmer; null restores the default
      Returns:
      this builder
    • session

      public ServerContext.Builder session(Equinix session)
      Uses an authenticated Equinix session as the source of every facade not explicitly injected.
      Parameters:
      session - the shared session
      Returns:
      this builder
    • environment

      public ServerContext.Builder environment(Map<String,String> environment)
      Overrides the environment view (defaults to System.getenv()).
      Parameters:
      environment - the replacement environment map
      Returns:
      this builder
    • objectMapper

      public ServerContext.Builder objectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
      Overrides the JSON mapper.
      Parameters:
      objectMapper - the mapper to use
      Returns:
      this builder
    • designStore

      public ServerContext.Builder designStore(DesignStore designStore)
      Overrides the design store (e.g. with a custom TTL or a test clock).
      Parameters:
      designStore - the store to use
      Returns:
      this builder
    • estateAnalyzerFactory

      public ServerContext.Builder estateAnalyzerFactory(Function<EstateScope, EstateAnalyzer.Builder> factory)
      Replaces how design_analyze_estate obtains its analysis (for example scope -> EstateAnalyzer.fromSnapshot(inventory) in tests). The scope is set on the returned builder afterwards.
      Parameters:
      factory - the factory
      Returns:
      this builder
    • providerRateCardFactory

      public ServerContext.Builder providerRateCardFactory(ServerContext.ProviderRateCardFactory factory)
      Overrides how live cloud-pricing adapters are created.
      Parameters:
      factory - the replacement factory
      Returns:
      this builder
    • fabric

      public ServerContext.Builder fabric(FabricGateway fabric)
      Injects the Fabric gateway directly (bypassing the session).
      Parameters:
      fabric - the gateway to use
      Returns:
      this builder
    • design

      public ServerContext.Builder design(Design design)
      Injects the design facade directly.
      Parameters:
      design - the facade to use
      Returns:
      this builder
    • customerPortal

      public ServerContext.Builder customerPortal(CustomerPortal customerPortal)
      Injects the Customer Portal client directly.
      Parameters:
      customerPortal - the client to use
      Returns:
      this builder
    • networkEdge

      public ServerContext.Builder networkEdge(NetworkEdge networkEdge)
      Injects the Network Edge client directly.
      Parameters:
      networkEdge - the client to use
      Returns:
      this builder
    • ibxSmartView

      public ServerContext.Builder ibxSmartView(IBXSmartView ibxSmartView)
      Injects the IBX SmartView client directly.
      Parameters:
      ibxSmartView - the client to use
      Returns:
      this builder
    • metroRegistry

      public ServerContext.Builder metroRegistry(MetroRegistry metroRegistry)
      Injects the metro registry directly.
      Parameters:
      metroRegistry - the registry to use
      Returns:
      this builder
    • multicloudEnvironments

      public ServerContext.Builder multicloudEnvironments(MulticloudEnvironmentCatalog catalog)
      Overrides the native multicloud environment catalog (defaults to the bundled MulticloudEnvironmentCatalog.standard()). Beta.
      Parameters:
      catalog - the catalog the design tools read; null restores the default
      Returns:
      this builder
    • build

      public ServerContext build()
      Returns:
      the built context