Class ServerContext.Builder
java.lang.Object
com.eqixiac.equinix.mcp.server.ServerContext.Builder
- Enclosing class:
ServerContext
Builder for
ServerContext.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()customerPortal(CustomerPortal customerPortal) Injects the Customer Portal client directly.Injects the design facade directly.designStore(DesignStore designStore) Overrides the design store (e.g. with a custom TTL or a test clock).environment(Map<String, String> environment) Overrides the environment view (defaults toSystem.getenv()).Replaces howdesign_analyze_estateobtains its analysis (for examplescope -> EstateAnalyzer.fromSnapshot(inventory)in tests).fabric(FabricGateway fabric) Injects the Fabric gateway directly (bypassing the session).humanConfirmer(HumanConfirmer confirmer) Replaces howServerContext.confirmWithHuman(String)asks a person.ibxSmartView(IBXSmartView ibxSmartView) Injects the IBX SmartView client directly.metroRegistry(MetroRegistry metroRegistry) Injects the metro registry directly.Overrides the native multicloud environment catalog (defaults to the bundledMulticloudEnvironmentCatalog.standard()).networkEdge(NetworkEdge networkEdge) Injects the Network Edge client directly.objectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper) Overrides the JSON mapper.Overrides how live cloud-pricing adapters are created.Uses an authenticatedEquinixsession as the source of every facade not explicitly injected.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
humanConfirmer
Replaces howServerContext.confirmWithHuman(String)asks a person. Default:HumanConfirmer.elicitation(), an MCP form elicitation over the bound exchange.- Parameters:
confirmer- the confirmer;nullrestores the default- Returns:
- this builder
-
session
Uses an authenticatedEquinixsession as the source of every facade not explicitly injected.- Parameters:
session- the shared session- Returns:
- this builder
-
environment
Overrides the environment view (defaults toSystem.getenv()).- Parameters:
environment- the replacement environment map- Returns:
- this builder
-
objectMapper
Overrides the JSON mapper.- Parameters:
objectMapper- the mapper to use- Returns:
- this builder
-
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 howdesign_analyze_estateobtains its analysis (for examplescope -> EstateAnalyzer.fromSnapshot(inventory)in tests). The scope is set on the returned builder afterwards.- Parameters:
factory- the factory- Returns:
- this builder
-
providerRateCardFactory
Overrides how live cloud-pricing adapters are created.- Parameters:
factory- the replacement factory- Returns:
- this builder
-
fabric
Injects the Fabric gateway directly (bypassing the session).- Parameters:
fabric- the gateway to use- Returns:
- this builder
-
design
Injects the design facade directly.- Parameters:
design- the facade to use- Returns:
- this builder
-
customerPortal
Injects the Customer Portal client directly.- Parameters:
customerPortal- the client to use- Returns:
- this builder
-
networkEdge
Injects the Network Edge client directly.- Parameters:
networkEdge- the client to use- Returns:
- this builder
-
ibxSmartView
Injects the IBX SmartView client directly.- Parameters:
ibxSmartView- the client to use- Returns:
- this builder
-
metroRegistry
Injects the metro registry directly.- Parameters:
metroRegistry- the registry to use- Returns:
- this builder
-
multicloudEnvironments
Overrides the native multicloud environment catalog (defaults to the bundledMulticloudEnvironmentCatalog.standard()). Beta.- Parameters:
catalog- the catalog the design tools read;nullrestores the default- Returns:
- this builder
-
build
- Returns:
- the built context
-