Class BackendDiscovery
This class provides type-based backend lookup using string type constants
(e.g., TYPE_PLOTTING, TYPE_TENSOR). It is the primary entry point for
UI code that needs to enumerate, filter, and select backends by category. It also integrates
with UserPreferences for persistent user preferences.
Relationship to BackendManager / AbstractBackendManager:
Domain-specific managers (e.g., PlottingBackendManager, AudioBackendManager)
extend AbstractBackendManager for typed management with registration and default
selection. BackendDiscovery complements this by providing cross-cutting, type-string
based queries used in the settings UI. Both use ServiceLoader independently,
which is intentional — domain managers load their specific subtypes (e.g., PlottingBackend),
while this class loads the generic Backend service.
- Since:
- 1.2
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Method Summary
Modifier and TypeMethodDescriptiongetBestProvider(String type) static BackendDiscoverygetPreferredProvider(String type) getProvider(String type, String id) getProvidersByType(String type) voidrefresh()voidsetPreferredProvider(String type, String providerId)
-
Field Details
-
TYPE_MATH
- See Also:
-
TYPE_TENSOR
- See Also:
-
TYPE_LINEAR_ALGEBRA
- See Also:
-
TYPE_MOLECULAR
- See Also:
-
TYPE_PLOTTING
- See Also:
-
TYPE_QUANTUM
- See Also:
-
TYPE_MAP
- See Also:
-
TYPE_GRAPH
- See Also:
-
TYPE_AUDIO
- See Also:
-
TYPE_DISTRIBUTED
- See Also:
-
TYPE_NETWORK
- See Also:
-
TYPE_IO
- See Also:
-
TYPE_ML
- See Also:
-
TYPE_VISION
- See Also:
-
TYPE_VIDEO
- See Also:
-
-
Method Details
-
getInstance
-
refresh
public void refresh() -
getProviders
-
getProvidersByType
-
getAvailableProvidersByType
-
getProvider
-
getBestProvider
-
getPreferredProvider
-
setPreferredProvider
-