Interface ConnectionTestExtension

All Superinterfaces:
HostExtensionPoint

public interface ConnectionTestExtension extends HostExtensionPoint
Implemented by a plugin bundle to back the Test Connection button for one bundle-declared configuration type.

An implementation is an ordinary Spring bean in the bundle's plugin context (see the X-Plugin-Context manifest header), discovered through PluginExtensionRegistry exactly as TaskExecutorExtension and LookupValuesExtension already are - nothing here is OSGi-specific, and no change to the platform's existing Test Connection dispatch is needed: the host resolves this extension the same way it already resolves a Jython-script or SCM-connector status check, and the button simply appears for any type one is registered for.

Execution model

test(com.xebialabs.deployit.plugin.api.udm.ConfigurationItem) runs on a UI request thread, not a task worker - a release author clicked a button and is waiting on the result. Keep it to a single request/response; seconds, not minutes.

Never let an exception escape. Catch failures and return a ConnectionTestResult. Use an explicit, secret-free message when it is safe and useful for the release author. An attached exception is for server-side diagnostics only; automatic fallback messages do not expose exception text.

See Also:
  • Method Details

    • getConfigurationType

      String getConfigurationType()
      The configuration type this test applies to, in prefix.Name form - for example "releaseLlm.McpServer". Matched against the configuration's declared type; must be unique across all installed plugins.
    • test

      Parameters:
      configuration - the variable-resolved configuration being tested, as the item itself - introspect it and follow its references through the platform's reflection API, exactly as during task execution. Password properties may be ciphertext; decrypt with the platform's encrypter at the point of use. Bind it to a record with ConfigurationBinder.bind for typed access. Do not retain it, pass it to another thread, or use it after this call returns - a reference resolves lazily and needs this call's scope.
      Returns:
      the outcome, whose message is shown to the release author on both success and failure - never null