Class ConnectorCatalog
java.lang.Object
com.darkcollective.relix.processor.connector.ConnectorCatalog
A catalog of downloadable connector plugins — the SPI-side analogue of the JDBC
DriverCatalog. It lets relix fetch a connector plugin (e.g. MongoDB)
it does not have locally.
Each ConnectorCatalog.Entry maps a connector type token ("mongodb",
"http", …) to the Artifacts that make up the plugin — the
connector JAR plus any driver/runtime JARs it needs — each with a SHA-256.
forType(String) resolves the entry for a connection's
connectorType.
A default catalog ships as the relix-connectors.json resource (empty
until plugins are published); it can be overridden by a file named in
$RELIX_CONNECTOR_CATALOG. Manifest format — a JSON array of entries:
[ { "type": "mongodb",
"artifacts": [ { "url": "https://.../relix-mongo-connector.jar", "sha256": "…" },
{ "url": "https://.../mongodb-driver-sync.jar", "sha256": "…" } ] } ]
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordA connector plugin: the type token it provides and the artifacts to download. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringEnvironment variable naming a manifest file that overrides the bundled default. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ConnectorCatalogentries()Finds the plugin for a connector type token (case-insensitive).static ConnectorCatalogParses a manifest from JSON text.
-
Field Details
-
CATALOG_ENV
Environment variable naming a manifest file that overrides the bundled default.- See Also:
-
-
Constructor Details
-
ConnectorCatalog
-
-
Method Details
-
entries
- Returns:
- all catalog entries, in manifest order
-
forType
Finds the plugin for a connector type token (case-insensitive).- Parameters:
connectorType- the token (e.g."mongodb")- Returns:
- the matching entry, or empty when no plugin is cataloged for the type
-
bundledDefault
- Returns:
- the catalog bundled as the
relix-connectors.jsonresource
-
parse
Parses a manifest from JSON text.- Parameters:
json- the manifest JSON (a top-level array of entries)- Returns:
- the parsed catalog
- Throws:
IllegalArgumentException- if the manifest is malformed
-