java.lang.Object
com.darkcollective.relix.processor.connector.ConnectorCatalog

public final class ConnectorCatalog extends Object
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": "…" } ] } ]
 
  • Field Details

    • CATALOG_ENV

      public static final String CATALOG_ENV
      Environment variable naming a manifest file that overrides the bundled default.
      See Also:
  • Constructor Details

  • Method Details

    • entries

      public List<ConnectorCatalog.Entry> entries()
      Returns:
      all catalog entries, in manifest order
    • forType

      public Optional<ConnectorCatalog.Entry> forType(String connectorType)
      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

      public static ConnectorCatalog bundledDefault()
      Returns:
      the catalog bundled as the relix-connectors.json resource
    • parse

      public static ConnectorCatalog parse(String json)
      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